Commit b7c44c8f by Jerry DeLisle

re PR libfortran/83168 (FAIL: gfortran.dg/fmt_f0_2.f90 with a sanitized libgfortran)

2017-11-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/83168
	* io/write.c (select_string): Bump size by one to avoid
	overrun.

From-SVN: r255225
parent db147565
2017-11-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/83168
* io/write.c (select_string): Bump size by one to avoid
overrun.
2017-11-24 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/36313
......
......@@ -1552,7 +1552,7 @@ select_string (st_parameter_dt *dtp, const fnode *f, char *buf, size_t *size,
int kind)
{
char *result;
*size = size_from_kind (dtp, f, kind) + f->u.real.d;
*size = size_from_kind (dtp, f, kind) + f->u.real.d + 1;
if (*size > BUF_STACK_SZ)
result = xmalloc (*size);
else
......
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