From 6c5536ff04afb76002b89c855719bd56e61f0176 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Mon, 8 Jul 2019 20:35:55 -0400 Subject: parserfunc: Return NULL on NOT operation overflow --- src/parserfunc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/parserfunc.c') diff --git a/src/parserfunc.c b/src/parserfunc.c index edd34f6..f35e6c5 100644 --- a/src/parserfunc.c +++ b/src/parserfunc.c @@ -866,7 +866,8 @@ pf_do_not(ParseNode* self) { set_error(self->state, PARSER_ERR_OVERFLOW, NULL); free(ans); - ans = NULL; + free(val); + return NULL; } mp_not(val, self->state->options->wordlen, ans); free(val); -- cgit v1.2.1