diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-07-02 22:03:50 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-07-02 22:03:50 +0300 |
commit | 9fe77c4d6778eb6b0ad377abf702e3472cd40564 (patch) | |
tree | da5c7240b4935d14743284587f7cee7483ecae66 | |
parent | 65f3bb6751dff212c78d67f2deee6602898873e9 (diff) | |
download | egawk-9fe77c4d6778eb6b0ad377abf702e3472cd40564.tar.gz egawk-9fe77c4d6778eb6b0ad377abf702e3472cd40564.tar.bz2 egawk-9fe77c4d6778eb6b0ad377abf702e3472cd40564.zip |
Bug fix in profile.c:pp_string for valgrind.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | profile.c | 4 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2013-07-02 Arnold D. Robbins <arnold@skeeve.com> + + * profile.c (pp_string): Add a call to chksize and fix another. + Avoids valgrind errors on profile5 test. Thanks to Andrew + Schorr for the report. + 2013-06-27 Arnold D. Robbins <arnold@skeeve.com> * awkgram.y: Minor whitespace cleanup, remove redundant ifdef. @@ -1232,6 +1232,8 @@ pp_string(const char *in_str, size_t len, int delim) *obufout++ = '\\'; *obufout++ = delim; } else if (*str == '\0') { + chksize(4); + *obufout++ = '\\'; *obufout++ = '0'; *obufout++ = '0'; @@ -1255,7 +1257,7 @@ pp_string(const char *in_str, size_t len, int delim) obufout += len; } } - chksize(1); + chksize(2); *obufout++ = delim; *obufout = '\0'; return obuf; |