Commit efea09f2 by Jerry DeLisle

re PR libfortran/69651 ([6 Regession] Usage of unitialized pointer io/list_read.c)

2016-02-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/69651
	* io/list_read.c (push_char4): Fix the pointer usage for xrealloc.

From-SVN: r233500
parent 1bed93e4
2016-02-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/69651
* io/list_read.c (push_char4): Fix the pointer usage for xrealloc.
2016-02-15 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2016-02-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/69651 PR libgfortran/69651
......
...@@ -119,7 +119,10 @@ push_char4 (st_parameter_dt *dtp, int c) ...@@ -119,7 +119,10 @@ push_char4 (st_parameter_dt *dtp, int c)
if (dtp->u.p.saved_used >= dtp->u.p.saved_length) if (dtp->u.p.saved_used >= dtp->u.p.saved_length)
{ {
dtp->u.p.saved_length = 2 * dtp->u.p.saved_length; dtp->u.p.saved_length = 2 * dtp->u.p.saved_length;
p = xrealloc (p, dtp->u.p.saved_length * sizeof (gfc_char4_t)); dtp->u.p.saved_string =
xrealloc (dtp->u.p.saved_string,
dtp->u.p.saved_length * sizeof (gfc_char4_t));
p = (gfc_char4_t *) dtp->u.p.saved_string;
} }
p[dtp->u.p.saved_used++] = c; p[dtp->u.p.saved_used++] = c;
......
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