diff options
author | Oliver Kiddle <opk@zsh.org> | 2014-11-30 23:19:55 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2014-11-30 23:19:55 +0100 |
commit | 0d4b548d1e4a08105597791fd6308d7fd70d3ddf (patch) | |
tree | 7d0922511173f14d601bf8599ce806be98ded888 /Src/exec.c | |
parent | 49d6aace41f5fe47abfaa87d25c42dbdb84dfb88 (diff) | |
download | zsh-0d4b548d1e4a08105597791fd6308d7fd70d3ddf.tar.gz zsh-0d4b548d1e4a08105597791fd6308d7fd70d3ddf.tar.xz zsh-0d4b548d1e4a08105597791fd6308d7fd70d3ddf.zip |
33818: fix types passed to sizeof detected by coverity as being wrong
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c index 2b7c55f8f..a5f877191 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -2299,13 +2299,13 @@ addvars(Estate state, Wordcode pc, int addflags) continue; } if (vl) { - ptr = arr = (char **) zalloc(sizeof(char **) * + ptr = arr = (char **) zalloc(sizeof(char *) * (countlinknodes(vl) + 1)); while (nonempty(vl)) *ptr++ = ztrdup((char *) ugetnode(vl)); } else - ptr = arr = (char **) zalloc(sizeof(char **)); + ptr = arr = (char **) zalloc(sizeof(char *)); *ptr = NULL; if (xtr) { |