From: Christoph Mallon Date: Sun, 29 May 2011 10:16:20 +0000 (+0200) Subject: Prevent dereferencing a null pointer, when parse_attribute_gnu() returns an empty... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=b0b70ac61baf1b611e9ffd2c008a1b22c16ffd6e;p=cparser Prevent dereferencing a null pointer, when parse_attribute_gnu() returns an empty list of attributes. --- 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: