From 936fd13c5b33cd6748788802ec3bb3445a396228 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 24 May 2011 21:07:15 +0000 Subject: [PATCH] godump.c (go_define): Don't accept a string immediately after another operand. * godump.c (go_define): Don't accept a string immediately after another operand. From-SVN: r174141 --- gcc/ChangeLog | 5 +++++ gcc/godump.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7264b1515af..9a5a4963594 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-05-24 Ian Lance Taylor + + * godump.c (go_define): Don't accept a string immediately after + another operand. + 2011-05-24 Ian Lance Taylor * godump.c (struct godump_container): Add invalid_hash field. diff --git a/gcc/godump.c b/gcc/godump.c index 4009899ecea..35db1d6a8c4 100644 --- a/gcc/godump.c +++ b/gcc/godump.c @@ -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) { -- 2.30.2