On 7 November 2015 at 14:54, Alan Wehmann <[email protected]> wrote: > Here is the Diff output: > > diff -u install-info.c install-info-fixed.c > --- install-info.c 2015-02-27 12:57:27.000000000 -0600 > +++ install-info-fixed.c 2015-11-07 08:48:36.000000000 -0600 > @@ -1445,6 +1445,8 @@ > if (c == '\n') > { > line_out[offset_out++] = c; > + line_out = (char *) realloc ((void *)line_out, allocated_out+1); > + line_out[offset_out+1] = '\0'; > strncat (*outstr, line_out, offset_out); > column = offset_out = 0; > continue; >
What happens if you take the "line_out[offset_out+1] = '\0'" line out but leave the realloc in? Does it work for the test file or does it break again?
