From: Sven Verdoolaege Date: Sun, 3 Feb 2013 12:50:49 +0000 (+0100) Subject: isl_input.c: accept_affine_factor: drop unexpected unknown identifier X-Git-Tag: isl-0.11.2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17869fa8671914a23e72847240d0f9e8ba64060d;p=platform%2Fupstream%2Fisl.git isl_input.c: accept_affine_factor: drop unexpected unknown identifier accept_affine_factor errors out on seeing an unknown identifier, but the identifier was incorrectly kept in the vars data structure, possibly resulting in bad accesses if parsing continues after the error. Signed-off-by: Sven Verdoolaege --- diff --git a/isl_input.c b/isl_input.c index f0c3d7c..a19fe6e 100644 --- a/isl_input.c +++ b/isl_input.c @@ -343,6 +343,7 @@ static __isl_give isl_pw_aff *accept_affine_factor(struct isl_stream *s, if (pos < 0) goto error; if (pos >= n) { + vars_drop(v, v->n - n); isl_stream_error(s, tok, "unknown identifier"); goto error; }