mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 13:01:28 +02:00
unposted (per 43938): Avoid segfault when unmetafying empty string
This commit is contained in:
parent
162c198aab
commit
7951ede1db
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2018-12-30 dana <dana@dana.is>
|
||||||
|
|
||||||
|
* unposted (per 43938): Src/utils.c: Avoid segfault when
|
||||||
|
unmetafying empty string
|
||||||
|
|
||||||
2018-12-29 dana <dana@dana.is>
|
2018-12-29 dana <dana@dana.is>
|
||||||
|
|
||||||
* 43953 (tweaked per 43954): Src/utils.c, Test/V09datetime.ztst:
|
* 43953 (tweaked per 43954): Src/utils.c, Test/V09datetime.ztst:
|
||||||
|
|
|
@ -3846,7 +3846,7 @@ sepjoin(char **s, char *sep, int heap)
|
||||||
char sepbuf[2];
|
char sepbuf[2];
|
||||||
|
|
||||||
if (!*s)
|
if (!*s)
|
||||||
return heap ? "" : ztrdup("");
|
return heap ? dupstring("") : ztrdup("");
|
||||||
if (!sep) {
|
if (!sep) {
|
||||||
/* optimise common case that ifs[0] is space */
|
/* optimise common case that ifs[0] is space */
|
||||||
if (ifs && *ifs != ' ') {
|
if (ifs && *ifs != ' ') {
|
||||||
|
|
Loading…
Reference in a new issue