godump.c (go_define): Don't accept a string immediately after another operand.
authorIan Lance Taylor <iant@google.com>
Tue, 24 May 2011 21:07:15 +0000 (21:07 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 24 May 2011 21:07:15 +0000 (21:07 +0000)
* godump.c (go_define): Don't accept a string immediately after
another operand.

From-SVN: r174141

gcc/ChangeLog
gcc/godump.c

index 7264b1515af826ad244642c63c67366866b3c403..9a5a49635943b4b15232d0f88cdf41fb9c2f485c 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-24  Ian Lance Taylor  <iant@google.com>
+
+       * godump.c (go_define): Don't accept a string immediately after
+       another operand.
+
 2011-05-24  Ian Lance Taylor  <iant@google.com>
 
        * godump.c (struct godump_container): Add invalid_hash field.
index 4009899eceae2887a019927cf9b280bb9a96b330..35db1d6a8c43f044f9ee2b874ea3d451b569e63d 100644 (file)
@@ -300,7 +300,11 @@ go_define (unsigned int lineno, const char *buffer)
        case '"':
        case '\'':
          {
-           char quote = *p;
+           char quote;
+
+           if (saw_operand)
+             goto unknown;
+           quote = *p;
            *q++ = *p++;
            while (*p != quote)
              {