Commit 730de5a5 by Jerry DeLisle

re PR libfortran/81938 (valgrind error message and heap-buffer-overflow on…

re PR libfortran/81938 (valgrind error message and heap-buffer-overflow on address sanitized libgfortran.so)

2017-10-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
	    Rimvydas (RJ)

	PR libgfortran/81938
	io/format.c (free_format_data): Don't try to free vlist
	descriptors past the end of the fnode array.

From-SVN: r254163
parent 6c6705a9
2017-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Rimvydas (RJ)
PR libgfortran/81938
io/format.c (free_format_data): Don't try to free vlist
descriptors past the end of the fnode array.
2017-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/82233
......
......@@ -266,7 +266,8 @@ free_format_data (format_data *fmt)
return;
/* Free vlist descriptors in the fnode_array if one was allocated. */
for (fnp = fmt->array.array; fnp->format != FMT_NONE; fnp++)
for (fnp = fmt->array.array; fnp < &fmt->array.array[FARRAY_SIZE] &&
fnp->format != FMT_NONE; fnp++)
if (fnp->format == FMT_DT)
{
if (GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment