]> gcc.gnu.org Git - gcc.git/commit
PR fortran/95530, PR fortran/95537 - Buffer overflows with long symbols
authorHarald Anlauf <anlauf@gmx.de>
Fri, 5 Jun 2020 18:30:34 +0000 (20:30 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 5 Jun 2020 19:29:58 +0000 (21:29 +0200)
commit36442ee216acbe9a345ae625be53efbde8626477
tree009819d6d409ecf011bbc288e0e49eb744b1572a
parentb3c17dfef86311a8b27b8e19854fd44cf8da29ee
PR fortran/95530, PR fortran/95537 - Buffer overflows with long symbols

The testcases for PR95090 and PR95106 trigger buffer overflows with long
symbols that were found with an instrumented compiler.  Enlarge the
affected buffers, and add checks that the buffers will suffice.

2020-06-05  Harald Anlauf  <anlauf@gmx.de>

gcc/fortran/
PR fortran/95530
PR fortran/95537
* decl.c (gfc_match_decl_type_spec): Enlarge buffer, and enhance
string copy to detect buffer overflow.
* gfortran.h (gfc_common_head): Enlarge buffer.
* trans-common.c (finish_equivalences): Enhance string copy to
detect buffer overflow.

(cherry picked from commit bcd96c9cce962ca5b2c6f8459597fb759f945ccf)
gcc/fortran/decl.c
gcc/fortran/gfortran.h
gcc/fortran/trans-common.c
This page took 0.063966 seconds and 6 git commands to generate.