packages/utils/bash/patches/121-upstream-bash42-021.patch
jow e5fbd81a61 [packages] bash: import upstream 4.2 patch series
git-svn-id: svn://svn.openwrt.org/openwrt/packages@31746 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-16 01:36:48 +00:00

49 lines
1.2 KiB
Diff

BASH PATCH REPORT
=================
Bash-Release: 4.2
Patch-ID: bash42-021
Bug-Reported-by: Dan Douglas <ormaaj@gmail.com>
Bug-Reference-ID: <4585554.nZWb4q7YoZ@smorgbox>
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-12/msg00084.html
Bug-Description:
Using `read -N' to assign values to an array can result in NUL values being
assigned to some array elements. These values cause seg faults when referenced
later.
Patch (apply with `patch -p0'):
--- a/builtins/read.def
+++ b/builtins/read.def
@@ -737,7 +737,7 @@ assign_vars:
xfree (t1);
}
else
- var = bind_read_variable (varname, t);
+ var = bind_read_variable (varname, t ? t : "");
}
else
{
@@ -798,7 +798,7 @@ assign_vars:
xfree (t);
}
else
- var = bind_read_variable (list->word->word, input_string);
+ var = bind_read_variable (list->word->word, input_string ? input_string : "");
if (var)
{
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 20
+#define PATCHLEVEL 21
#endif /* _PATCHLEVEL_H_ */