From b0b70ac61baf1b611e9ffd2c008a1b22c16ffd6e Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 29 May 2011 12:16:20 +0200 Subject: [PATCH] Prevent dereferencing a null pointer, when parse_attribute_gnu() returns an empty list of attributes. --- parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parser.c b/parser.c index be04d23..46c41da 100644 --- a/parser.c +++ b/parser.c @@ -1331,6 +1331,8 @@ static attribute_t *parse_attributes(attribute_t *first) switch (token.type) { case T___attribute__: attribute = parse_attribute_gnu(); + if (attribute == NULL) + continue; break; case T_asm: -- 2.20.1