mpick: fix off-by-one in parse_string (expression parsing)

pull/158/head v0.5
Duncaen 5 years ago
parent 820c07b7e4
commit cfba3e1c3b

@ -14,6 +14,7 @@
* mscan: new flag -v for statistics
* magrep: add -h, which is like -p but doesn't print the file name
* mscan: prioritize displaying trashed mail over other markers
* mpick: fix off-by-one in expression parsing
* Many bug fixes
## 0.4 (2018-08-15)

@ -284,7 +284,7 @@ parse_string(char **s)
pos++;
while (*pos &&
(*pos != '"' || (*pos == '"' && *(pos+1) == '"'))) {
if (len >= bufsiz) {
if (len+1 >= bufsiz) {
bufsiz = 2*bufsiz + 16;
buf = realloc(buf, bufsiz);
if (!buf)

Loading…
Cancel
Save