diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/lex.c | 8 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2002-04-03 Guerrero, Juan Manuel <st001906@hrz1.hrz.tu-darmstadt.de> + + * src/lex.c (parse_percent_token): Zero terminate all token_obstack + and token_buffer strings. + 2002-03-25 Akim Demaille <akim@epita.fr> Version 1.35. @@ -596,10 +596,12 @@ parse_percent_token (void) switch (c) { case '%': + obstack_1grow (&token_obstack, '\0'); token_buffer = obstack_finish (&token_obstack); return tok_two_percents; case '{': + obstack_1grow (&token_obstack, '\0'); token_buffer = obstack_finish (&token_obstack); return tok_percent_left_curly; @@ -607,28 +609,34 @@ parse_percent_token (void) very ancient Yacc versions. The paper of Johnson mentions them (as ancient :). */ case '<': + obstack_1grow (&token_obstack, '\0'); token_buffer = obstack_finish (&token_obstack); return tok_left; case '>': + obstack_1grow (&token_obstack, '\0'); token_buffer = obstack_finish (&token_obstack); return tok_right; case '2': + obstack_1grow (&token_obstack, '\0'); token_buffer = obstack_finish (&token_obstack); return tok_nonassoc; case '0': + obstack_1grow (&token_obstack, '\0'); token_buffer = obstack_finish (&token_obstack); return tok_token; case '=': + obstack_1grow (&token_obstack, '\0'); token_buffer = obstack_finish (&token_obstack); return tok_prec; } if (!isalpha (c)) { + obstack_1grow (&token_obstack, '\0'); token_buffer = obstack_finish (&token_obstack); return tok_illegal; } |