1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-04 22:51:42 +02:00

unposted (per 43938): Avoid segfault when unmetafying empty string

This commit is contained in:
dana 2018-12-30 03:42:07 -06:00
parent 162c198aab
commit 7951ede1db
2 changed files with 6 additions and 1 deletions

View file

@ -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>
* 43953 (tweaked per 43954): Src/utils.c, Test/V09datetime.ztst:

View file

@ -3846,7 +3846,7 @@ sepjoin(char **s, char *sep, int heap)
char sepbuf[2];
if (!*s)
return heap ? "" : ztrdup("");
return heap ? dupstring("") : ztrdup("");
if (!sep) {
/* optimise common case that ifs[0] is space */
if (ifs && *ifs != ' ') {