[packages/crossavr-gcc] - more fixes

baggins baggins at pld-linux.org
Fri Dec 7 23:27:09 CET 2012


commit fc8db2a35b36df08835e19ce62835f8149f895b3
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Dec 7 23:26:56 2012 +0100

    - more fixes

 format-security.patch | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)
---
diff --git a/format-security.patch b/format-security.patch
index c5e5515..f6a7bbe 100644
--- a/format-security.patch
+++ b/format-security.patch
@@ -69,3 +69,93 @@
  	    dw2_asm_output_data (HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR,
  				 second, NULL);
  	  }
+--- gcc-4.6.2/gcc/opts.c~	2011-02-17 23:51:57.000000000 +0100
++++ gcc-4.6.2/gcc/opts.c	2012-12-07 23:15:33.207691953 +0100
+@@ -996,7 +996,7 @@
+ 		      if (* (const char **) flag_var != NULL)
+ 			snprintf (new_help + strlen (new_help),
+ 				  sizeof (new_help) - strlen (new_help),
+-				  * (const char **) flag_var);
++				  "%s", * (const char **) flag_var);
+ 		    }
+ 		  else if (option->var_type == CLVC_ENUM)
+ 		    {
+@@ -1010,7 +1010,7 @@
+ 			arg = _("[default]");
+ 		      snprintf (new_help + strlen (new_help),
+ 				sizeof (new_help) - strlen (new_help),
+-				arg);
++				"%s", arg);
+ 		    }
+ 		  else
+ 		    sprintf (new_help + strlen (new_help),
+--- gcc-4.6.2/gcc/tree-sra.c~	2011-10-19 10:45:45.000000000 +0200
++++ gcc-4.6.2/gcc/tree-sra.c	2012-12-07 23:19:42.351016497 +0100
+@@ -3480,7 +3480,7 @@
+ {
+   basic_block bb;
+ 
+-  fprintf (dump_file, str);
++  fprintf (dump_file, "%s", str);
+   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
+     {
+       fprintf (f, "%4i  %i   ", bb->index, bitmap_bit_p (final_bbs, bb->index));
+--- gcc-4.6.2/gcc/tree-ssa-uninit.c~	2010-11-30 12:41:24.000000000 +0100
++++ gcc-4.6.2/gcc/tree-ssa-uninit.c	2012-12-07 23:21:21.597679662 +0100
+@@ -604,7 +604,7 @@
+ {
+   size_t i, j;
+   VEC(use_pred_info_t, heap) *one_pred_chain;
+-  fprintf (dump_file, msg);
++  fprintf (dump_file, "%s", msg);
+   print_gimple_stmt (dump_file, usestmt, 0, 0);
+   fprintf (dump_file, "is guarded by :\n");
+   /* do some dumping here:  */
+--- gcc-4.6.2/gcc/config/avr/avr.c~	2012-12-07 22:26:44.269683471 +0100
++++ gcc-4.6.2/gcc/config/avr/avr.c	2012-12-07 23:23:14.087675694 +0100
+@@ -1413,7 +1413,7 @@
+   switch (GET_CODE (addr))
+     {
+     case REG:
+-      fprintf (file, ptrreg_to_str (REGNO (addr)));
++      fprintf (file, "%s", ptrreg_to_str (REGNO (addr)));
+       break;
+ 
+     case PRE_DEC:
+@@ -1485,7 +1485,7 @@
+       if (x == zero_reg_rtx)
+ 	fprintf (file, "__zero_reg__");
+       else
+-	fprintf (file, reg_names[true_regnum (x) + abcd]);
++	fprintf (file, "%s", reg_names[true_regnum (x) + abcd]);
+     }
+   else if (GET_CODE (x) == CONST_INT)
+     fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) + abcd);
+--- gcc-4.6.2/gcc/collect2.c~	2011-01-06 19:50:20.000000000 +0100
++++ gcc-4.6.2/gcc/collect2.c	2012-12-07 23:25:18.514337971 +0100
+@@ -2086,10 +2086,10 @@
+       if (err != 0)
+ 	{
+ 	  errno = err;
+-	  fatal_perror (errmsg);
++	  fatal_perror ("%s", errmsg);
+ 	}
+       else
+-	fatal (errmsg);
++	fatal ("%s", errmsg);
+     }
+ 
+   if (response_arg)
+@@ -2627,10 +2627,10 @@
+       if (err != 0)
+ 	{
+ 	  errno = err;
+-	  fatal_perror (errmsg);
++	  fatal_perror ("%s", errmsg);
+ 	}
+       else
+-	fatal (errmsg);
++	fatal ("%s", errmsg);
+     }
+ 
+   int_handler  = (void (*) (int)) signal (SIGINT,  SIG_IGN);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crossavr-gcc.git/commitdiff/fc8db2a35b36df08835e19ce62835f8149f895b3



More information about the pld-cvs-commit mailing list