aboutsummaryrefslogtreecommitdiffstats
path: root/shells
diff options
context:
space:
mode:
authorroam <roam@FreeBSD.org>2000-12-08 21:04:24 +0800
committerroam <roam@FreeBSD.org>2000-12-08 21:04:24 +0800
commit8addd378b8bdf3c04352fbd8a2086b1c7357bba0 (patch)
tree3945cb015b7da3bf185ff95584d44c68c7d693b7 /shells
parent1cdb06e16b1c71a63f59042bf15a6f7683d617fb (diff)
downloadfreebsd-ports-gnome-8addd378b8bdf3c04352fbd8a2086b1c7357bba0.tar.gz
freebsd-ports-gnome-8addd378b8bdf3c04352fbd8a2086b1c7357bba0.tar.zst
freebsd-ports-gnome-8addd378b8bdf3c04352fbd8a2086b1c7357bba0.zip
free() before realloc() is bad, bad, bad.
Submitted by: Loren James Rittle <rittle@latour.rsch.comm.mot.com>
Diffstat (limited to 'shells')
-rw-r--r--shells/es/files/patch-ab13
1 files changed, 13 insertions, 0 deletions
diff --git a/shells/es/files/patch-ab b/shells/es/files/patch-ab
new file mode 100644
index 000000000000..e191c67a04b3
--- /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 ----
+