Commit Diff
- Commit:
08b9feb5df5a93ed2a422126736561588a59544a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
- Message:
- fix off-by-one Thanks to the fact that we're using a bigger buffer in the net process, and thanks to the way otto@' malloc works, it was easy to detect this off-by-one in a large page (RFC3089 in particular).
- Actions:
- Patch | Tree
--- parser.c +++ parser.c @@ -128,7 +128,7 @@ parser_foreach_line(struct parser *p, const char *buf, ++i; continue; } - memmove(&b[i], &b[i+1], len - i); + memmove(&b[i], &b[i+1], len - i - 1); len--; }