From 8addd378b8bdf3c04352fbd8a2086b1c7357bba0 Mon Sep 17 00:00:00 2001 From: roam Date: Fri, 8 Dec 2000 13:04:24 +0000 Subject: free() before realloc() is bad, bad, bad. Submitted by: Loren James Rittle --- shells/es/files/patch-ab | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 shells/es/files/patch-ab (limited to 'shells') diff --git a/shells/es/files/patch-ab b/shells/es/files/patch-ab new file mode 100644 index 0000000..e191c67 --- /dev/null +++ b/shells/es/files/patch-ab @@ -0,0 +1,13 @@ +*** 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 ---- + -- cgit v1.1