freebsd-ports/shells/es/files/patch-ab
Peter Pentchev df14c0842b free() before realloc() is bad, bad, bad.
Submitted by:	Loren James Rittle <rittle@latour.rsch.comm.mot.com>
2000-12-08 13:04:24 +00:00

14 lines
357 B
Plaintext

*** input.c.orig Tue Aug 12 18:59:26 1997
--- input.c Thu Dec 7 18:35:01 2000
***************
*** 307,313 ****
if (in->buflen < nread) {
while (in->buflen < nread)
in->buflen *= 2;
- efree(in->bufbegin);
in->bufbegin = erealloc(in->bufbegin, in->buflen);
}
memcpy(in->bufbegin, rlinebuf, nread - 1);
--- 307,312 ----