diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-12-14 21:29:24 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-12-14 21:29:24 +0200 |
commit | 6e786e9ea47966a9cac7cfef4a4079ac379580b0 (patch) | |
tree | 5765d8bf454f46a49ee51a5a23a38e10a57bcd1b /io.c | |
parent | c55956b6a10d0a4d0b151c1be976dc9c344c1103 (diff) | |
download | egawk-6e786e9ea47966a9cac7cfef4a4079ac379580b0.tar.gz egawk-6e786e9ea47966a9cac7cfef4a4079ac379580b0.tar.bz2 egawk-6e786e9ea47966a9cac7cfef4a4079ac379580b0.zip |
Fix to previous change. Now passes valgrind.
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2554,7 +2554,8 @@ init_awkpath(path_info *pi) end++; len = end - start; if (len > 0) { - emalloc(p, char *, len + 1, "init_awkpath"); + /* +2 is correct here; leave room for / */ + emalloc(p, char *, len + 2, "init_awkpath"); memcpy(p, start, len); /* add directory punctuation if necessary */ |