diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | Src/glob.c | 2 | ||||
-rw-r--r-- | Src/text.c | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 472551069..6dc79b5df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2015-08-10 Barton E. Schaefer <schaefer@zsh.org> + * 36084: Src/glob.c, Src/text.c: use zrealloc() consistently + * 36079: Src/signals.c: do not allow update_job() and its helpers to run the signal queue while we are processing a job exit. diff --git a/Src/glob.c b/Src/glob.c index f82c3bd30..3af46904d 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -257,7 +257,7 @@ addpath(char *s, int l) { DPUTS(!pathbuf, "BUG: pathbuf not initialised"); while (pathpos + l + 1 >= pathbufsz) - pathbuf = realloc(pathbuf, pathbufsz *= 2); + pathbuf = zrealloc(pathbuf, pathbufsz *= 2); while (l--) pathbuf[pathpos++] = *s++; pathbuf[pathpos++] = '/'; diff --git a/Src/text.c b/Src/text.c index cf73004d5..3978a26a9 100644 --- a/Src/text.c +++ b/Src/text.c @@ -77,7 +77,7 @@ taddpending(char *str1, char *str2) */ if (tpending) { int oldlen = strlen(tpending); - tpending = realloc(tpending, len + oldlen); + tpending = zrealloc(tpending, len + oldlen); sprintf(tpending + oldlen, "%s%s", str1, str2); } else { tpending = (char *)zalloc(len); @@ -110,7 +110,7 @@ taddchr(int c) tptr--; return; } - tbuf = realloc(tbuf, tsiz *= 2); + tbuf = zrealloc(tbuf, tsiz *= 2); tlim = tbuf + tsiz; tptr = tbuf + tsiz / 2; } @@ -130,7 +130,7 @@ taddstr(char *s) if (!tbuf) return; - tbuf = realloc(tbuf, tsiz *= 2); + tbuf = zrealloc(tbuf, tsiz *= 2); tlim = tbuf + tsiz; tptr = tbuf + x; } |