From 0d67b3a33e4c1d0a52a3afef795a60eb3b18a118 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Tue, 21 Jun 2022 20:20:51 -0300 Subject: [PATCH] Fix buffer overflow Co-authored-by: Ezequiel Bellver Co-authored-by: Juan Barmasch --- src/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 2367347..06df16f 100644 --- a/src/parser.c +++ b/src/parser.c @@ -62,7 +62,7 @@ struct parser_event * parser_feed(struct parser *p, const uint8_t c) { return &p->e1; } -static const unsigned classes[0xFF] = {0x00}; +static const unsigned classes[0xFF + 1] = {0x00}; const unsigned * parser_no_classes(void) { return classes;