diff options
| author | Barton E. Schaefer <schaefer@zsh.org> | 2013-11-27 22:09:48 -0800 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2013-11-27 22:09:48 -0800 |
| commit | 561811602059a9b948be636710b45662174d1a6a (patch) | |
| tree | 861d4ce688d7b331a0d2a77029ee0bf2e5a43922 | |
| parent | unposted: fix ChangeLog reference to last test version (diff) | |
| download | zsh-561811602059a9b948be636710b45662174d1a6a.tar zsh-561811602059a9b948be636710b45662174d1a6a.tar.gz zsh-561811602059a9b948be636710b45662174d1a6a.tar.bz2 zsh-561811602059a9b948be636710b45662174d1a6a.tar.lz zsh-561811602059a9b948be636710b45662174d1a6a.tar.xz zsh-561811602059a9b948be636710b45662174d1a6a.tar.zst zsh-561811602059a9b948be636710b45662174d1a6a.zip | |
32061: Fix "use of uninitialized memory" in metafy
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | Src/utils.c | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,7 @@ +2013-11-27 Barton E. Schaefer <schaefer@zsh.org> + + * 32061: Src/utils.c: Fix "use of uninitialized memory" in metafy + 2013-11-27 Peter Stephenson <p.stephenson@samsung.com> * unposted, see 32054 and thread: diff --git a/Src/utils.c b/Src/utils.c index 0db9c30a6..c6d178ce2 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -3985,7 +3985,7 @@ metafy(char *buf, int len, int heap) if (imeta(*e++)) meta++; - if (meta || heap == META_DUP || heap == META_HEAPDUP || *e != '\0') { + if (meta || heap == META_DUP || heap == META_HEAPDUP) { switch (heap) { case META_REALLOC: buf = zrealloc(buf, len + meta + 1); @@ -4028,8 +4028,8 @@ metafy(char *buf, int len, int heap) meta--; } } - *e = '\0'; } + *e = '\0'; return buf; } |
