From 9df59bba97f148fbc5b85735cad107fddcf16ee4 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 11 Nov 2002 08:42:52 +0000 Subject: * macro.c (get_any_string): Correct logic for not going beyond end of in->ptr[]. --- gas/ChangeLog | 5 +++++ gas/macro.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 4f25aae..e4e95b5 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2002-11-11 Hans-Peter Nilsson + + * macro.c (get_any_string): Correct logic for not going beyond end + of in->ptr[]. + 2002-11-10 Hans-Peter Nilsson * config/tc-mmix.c (get_putget_operands): Mark both possible diff --git a/gas/macro.c b/gas/macro.c index 0842431..3f2aaf6 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++]); -- cgit v1.1