diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-12-19 18:51:30 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-12-19 18:51:30 -0800 |
| commit | c477bfdbd5d6464cde70806d9a6704c54ede3e88 (patch) | |
| tree | bacad354193194c717ebffae3d6c76b252b1a9a2 /vm.c | |
| parent | b098e5225ae2fe7d99b3f99bb5aebcefd9731f96 (diff) | |
Fix for range at the end of a file
Diffstat (limited to 'vm.c')
| -rw-r--r-- | vm.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -125,6 +125,7 @@ static match_t *_match(grammar_t *g, file_t *f, const char *str, vm_op_t *op, un return m; } case VM_RANGE: { + if (str >= f->end) return NULL; if ((unsigned char)*str < op->args.range.low || (unsigned char)*str > op->args.range.high) return NULL; match_t *m = new(match_t); |
