mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-22 21:37:58 +02:00
Bash-5.2 patch 5: fix crash with null pattern substitution replacement string
This commit is contained in:
+1
-1
@@ -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 4
|
||||
#define PATCHLEVEL 5
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
|
||||
@@ -8965,7 +8965,8 @@ pat_subst (string, pat, rep, mflags)
|
||||
return (ret);
|
||||
}
|
||||
else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0))
|
||||
return ((mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2) : savestring (rep));
|
||||
return (mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2)
|
||||
: (rep ? savestring (rep) : savestring (""));
|
||||
|
||||
ret = (char *)xmalloc (rsize = 64);
|
||||
ret[0] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user