summaryrefslogtreecommitdiffstats
path: root/package/haserl/haserl-0.9.25/haserl-0.9.25-array-vars-fix.patch
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-07-22 15:30:00 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2009-07-22 15:30:00 +0200
commite3298fdae9f46feccf95268761dbdee0cbbf6c14 (patch)
treefd1410e3050b7822eb9ee5d57ceb5a9561c0cc8e /package/haserl/haserl-0.9.25/haserl-0.9.25-array-vars-fix.patch
parent0fec1b5ce38d99851ab811bf9a8fa5efa7ff0244 (diff)
downloadbuildroot-novena-e3298fdae9f46feccf95268761dbdee0cbbf6c14.tar.gz
buildroot-novena-e3298fdae9f46feccf95268761dbdee0cbbf6c14.zip
haserl: move 0.9.25 fix to subdir, so it isn't picked up by 0.8.0 build
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/haserl/haserl-0.9.25/haserl-0.9.25-array-vars-fix.patch')
-rw-r--r--package/haserl/haserl-0.9.25/haserl-0.9.25-array-vars-fix.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/package/haserl/haserl-0.9.25/haserl-0.9.25-array-vars-fix.patch b/package/haserl/haserl-0.9.25/haserl-0.9.25-array-vars-fix.patch
new file mode 100644
index 000000000..e6c959a66
--- /dev/null
+++ b/package/haserl/haserl-0.9.25/haserl-0.9.25-array-vars-fix.patch
@@ -0,0 +1,19 @@
+haserl: array vars fix
+
+Fix buffer overflow error. Len is the length of the name= part of the
+name=value string, not the value part.
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+Index: haserl-0.9.25/src/haserl.c
+===================================================================
+--- haserl-0.9.25.orig/src/haserl.c 2009-07-20 15:05:26.000000000 +0200
++++ haserl-0.9.25/src/haserl.c 2009-07-20 15:06:05.000000000 +0200
+@@ -269,7 +269,7 @@
+ /* if an array, create a new string with this
+ * value added to the end of the old value(s)
+ */
+- temp = xmalloc (strlen (cur->buf) + len + 1);
++ temp = xmalloc (strlen (cur->buf) + strlen(entry) - len + 1);
+ memmove (temp, cur->buf, strlen (cur->buf) + 1);
+ strcat (temp, "\n");
+ strcat (temp, str + keylen + 3);