[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-fortran
Subject:    [committed, fortran] PR 60766 fix buffer overflow
From:       Mikael Morin <mikael.morin () sfr ! fr>
Date:       2014-03-28 19:07:00
Message-ID: 5335C854.4040709 () sfr ! fr
[Download RAW message or body]

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


["r208913.diff" (text/x-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);



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic