diff mbox

[committed,fortran] PR 60766 fix buffer overflow

Message ID 5335C854.4040709@sfr.fr
State New
Headers show

Commit Message

Mikael Morin March 28, 2014, 7:07 p.m. UTC
Hello,

I fixed an ICE in pr59599 due to a wrong number of arguments passed to
the ichar function, but I forgot to update the size of the buffer
containing the argument list. Fixed thusly.
I have tested the patch (attached) on x86_64-unknown-linux-gnu and
committed it as revision 208913.
Thanks to Tobias for identifying the problem.

Mikael
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(révision 208912)
+++ ChangeLog	(révision 208913)
@@ -1,5 +1,11 @@ 
-2014-04-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
+2014-03-28  Mikael Morin  <mikael@gcc.gnu.org>
 
+	PR fortran/60677
+	* trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument
+	list buffer.
+
+2014-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
 	PR fortran/60522
 	* frontend-passes.c (cfe_code):  Do not walk subtrees
 	for WHERE.
Index: trans-intrinsic.c
===================================================================
--- trans-intrinsic.c	(révision 208912)
+++ trans-intrinsic.c	(révision 208913)
@@ -4687,7 +4687,7 @@  gfc_conv_intrinsic_index_scan_verify (gfc_se * se,
 static void
 gfc_conv_intrinsic_ichar (gfc_se * se, gfc_expr * expr)
 {
-  tree args[2], type, pchartype;
+  tree args[3], type, pchartype;
   int nargs;
 
   nargs = gfc_intrinsic_argument_list_length (expr);