summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2002-11-11 08:42:52 +0000
committerHans-Peter Nilsson <hp@axis.com>2002-11-11 08:42:52 +0000
commitd2afb014e6d315f52d532cab1b61e5c476e9a914 (patch)
tree41c9ab3fd294240db4d5fc8b7ed44c3000df7f09
parent9ba4a006702547d73e98c9958825701e92e8d9a5 (diff)
downloadbinutils-redhat-d2afb014e6d315f52d532cab1b61e5c476e9a914.tar.gz
* macro.c (get_any_string): Correct logic for not going beyond end
of in->ptr[].
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/macro.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 4f25aae6e3..e4e95b532b 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-11 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * macro.c (get_any_string): Correct logic for not going beyond end
+ of in->ptr[].
+
2002-11-10 Hans-Peter Nilsson <hp@bitrange.com>
* config/tc-mmix.c (get_putget_operands): Mark both possible
diff --git a/gas/macro.c b/gas/macro.c
index 08424317c4..3f2aaf6118 100644
--- a/gas/macro.c
+++ b/gas/macro.c
@@ -366,7 +366,7 @@ get_any_string (idx, in, out, expand, pretend_quoted)
if (idx < in->len)
{
- if (in->len > 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx]))
+ if (in->len > idx + 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx]))
{
while (!ISSEP (in->ptr[idx]))
sb_add_char (out, in->ptr[idx++]);