From 6405da9f810302a2b2799968a5891184a8a578fa Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 26 Apr 2012 19:13:24 +0200 Subject: [PATCH] Correct anchor underflow in case of error in parse_microsoft_extended_decl_modifier(). --- parser.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/parser.c b/parser.c index 1644fa3..601fa46 100644 --- a/parser.c +++ b/parser.c @@ -2673,7 +2673,7 @@ static attribute_t *parse_microsoft_extended_decl_modifier(attribute_t *first) attribute_t *attribute = parse_microsoft_extended_decl_modifier_single(); if (attribute == NULL) - goto end_error; + break; *anchor = attribute; anchor = &attribute->next; @@ -2681,10 +2681,7 @@ static attribute_t *parse_microsoft_extended_decl_modifier(attribute_t *first) rem_anchor_token(')'); expect(')', end_error); - return first; - end_error: - rem_anchor_token(')'); return first; } -- 2.20.1