diff options
Diffstat (limited to 'source/a/bash/bash-5.2-patches/bash52-005')
-rw-r--r-- | source/a/bash/bash-5.2-patches/bash52-005 | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/source/a/bash/bash-5.2-patches/bash52-005 b/source/a/bash/bash-5.2-patches/bash52-005 new file mode 100644 index 000000000..3f6a85215 --- /dev/null +++ b/source/a/bash/bash-5.2-patches/bash52-005 @@ -0,0 +1,47 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.2 +Patch-ID: bash52-005 + +Bug-Reported-by: Justin Wood (Callek) <callek@gmail.com> +Bug-Reference-ID: <CANBDKY9fp2yiXONP7RY4kNuRteuovUebxSJaqePHeu7cyaFS9Q@mail.gmail.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00088.html + +Bug-Description: + +Null pattern substitution replacement strings can cause a crash. + +Patch (apply with `patch -p0'): + +*** ../bash-5.2-patched/subst.c 2022-10-05 10:22:02.000000000 -0400 +--- subst.c 2022-10-13 16:57:26.000000000 -0400 +*************** +*** 8966,8970 **** + } + else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0)) +! return ((mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2) : savestring (rep)); + + ret = (char *)xmalloc (rsize = 64); +--- 8966,8971 ---- + } + else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0)) +! return (mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2) +! : (rep ? savestring (rep) : savestring ("")); + + ret = (char *)xmalloc (rsize = 64); +*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 4 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 5 + + #endif /* _PATCHLEVEL_H_ */ |