diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2010-05-05 14:17:50 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2010-05-05 14:17:50 +0000 |
commit | 847d4311801b81716f9670f25ae97aace2740519 (patch) | |
tree | 9c2fe895c155cd4ec40423ce04f6f808de1ddd5b /gas/read.c | |
parent | 1412f70bc66429290d396f9b0d19ac0851c019b5 (diff) | |
download | gdb-847d4311801b81716f9670f25ae97aace2740519.zip gdb-847d4311801b81716f9670f25ae97aace2740519.tar.gz gdb-847d4311801b81716f9670f25ae97aace2740519.tar.bz2 |
* read.c (cons_worker): Detect and reject unexpected string argument.
testsuite/
* gas/all/byte.s: New.
* gas/all/byte.l: New.
* gas/all/byte.d: New.
* gas/all/gas.exp: Add it.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -3865,7 +3865,15 @@ cons_worker (int nbytes, /* 1=.byte, 2=.word, 4=.long. */ parse_mri_cons (&exp, (unsigned int) nbytes); else #endif - TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes); + { + if (*input_line_pointer == '"') + { + as_bad (_("unexpected `\"' in expression")); + ignore_rest_of_line (); + return; + } + TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes); + } if (rva) { |