Prevent dereferencing a null pointer, when parse_attribute_gnu() returns an empty...
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 29 May 2011 10:16:20 +0000 (12:16 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 29 May 2011 10:16:20 +0000 (12:16 +0200)
parser.c

index be04d23..46c41da 100644 (file)
--- 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: