]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/54382 (gfortran show_locus: Invalid read of size 4)
authorTobias Burnus <burnus@net-b.de>
Tue, 28 Aug 2012 14:49:55 +0000 (16:49 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Tue, 28 Aug 2012 14:49:55 +0000 (16:49 +0200)
2012-08-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54382
        * error.c (show_locus): Avoid out of bound access.

From-SVN: r190752

gcc/fortran/ChangeLog
gcc/fortran/error.c

index f9bbf8a167e7b495411692b0fd7969fbd69754fc..3a6a23e8199a9b18a759070e1772d1642ef0cd85 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-28  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/54382
+       * error.c (show_locus): Avoid out of bound access.
+
 2012-08-28  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/54384
index dde6a0fb52743202bd573ed6e9f04392b0d0396c..64b9357a21552f8756c0f43e2028ac7cb4f80d81 100644 (file)
@@ -384,6 +384,7 @@ show_locus (locus *loc, int c1, int c2)
 
   c1 -= offset;
   c2 -= offset;
+  cmax -= offset;
 
   p = &(lb->line[offset]);
   for (i = 0; i <= cmax; i++)