diff options
| -rw-r--r-- | fuzz/oplist-crashes/clusterfuzz-testcase-minimized-oplist_fuzzer-4503815405830144 | 1 | ||||
| -rw-r--r-- | src/oplist.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/fuzz/oplist-crashes/clusterfuzz-testcase-minimized-oplist_fuzzer-4503815405830144 b/fuzz/oplist-crashes/clusterfuzz-testcase-minimized-oplist_fuzzer-4503815405830144 new file mode 100644 index 0000000..11496c4 --- /dev/null +++ b/fuzz/oplist-crashes/clusterfuzz-testcase-minimized-oplist_fuzzer-4503815405830144 | |||
| @@ -0,0 +1 @@ | |||
| "3ÿÿÿÿ"= /// hÐo/**5/*(*///6/*/#o/,{Å \ No newline at end of file | |||
diff --git a/src/oplist.c b/src/oplist.c index 0ad1d1c..122440f 100644 --- a/src/oplist.c +++ b/src/oplist.c | |||
| @@ -508,6 +508,9 @@ static void parse_skip_ws(parse_ctx ctx) | |||
| 508 | ctx->pos++; | 508 | ctx->pos++; |
| 509 | } | 509 | } |
| 510 | } | 510 | } |
| 511 | if (ctx->pos >= ctx->end) { | ||
| 512 | break; | ||
| 513 | } | ||
| 511 | } | 514 | } |
| 512 | // break on any char that's not white space | 515 | // break on any char that's not white space |
| 513 | if (!(((*(ctx->pos) == ' ') || (*(ctx->pos) == '\t') || (*(ctx->pos) == '\r') || (*(ctx->pos) == '\n')))) { | 516 | if (!(((*(ctx->pos) == ' ') || (*(ctx->pos) == '\t') || (*(ctx->pos) == '\r') || (*(ctx->pos) == '\n')))) { |
