From 60e917fa7cb55b4f675110bae78df56cd49bd486 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 5 Jun 2019 11:56:11 +0200 Subject: src: dynamic input_descriptor allocation This patch introduces the input descriptor list, that stores the existing input descriptor objects. These objects are now dynamically allocated and release from scanner_destroy() path. Follow up patches that decouple the parsing and the evaluation phases require this for error reporting as described by b14572f72aac ("erec: Fix input descriptors for included files"), this patch partially reverts such partial. Signed-off-by: Pablo Neira Ayuso --- include/parser.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/parser.h') diff --git a/include/parser.h b/include/parser.h index 8e57899e..a5ae802b 100644 --- a/include/parser.h +++ b/include/parser.h @@ -15,8 +15,9 @@ struct parser_state { struct input_descriptor *indesc; - struct input_descriptor indescs[MAX_INCLUDE_DEPTH]; + struct input_descriptor *indescs[MAX_INCLUDE_DEPTH]; unsigned int indesc_idx; + struct list_head indesc_list; struct list_head *msgs; unsigned int nerrs; -- cgit v1.2.3