diff options
author | Nick Clifton <nickc@redhat.com> | 1999-11-12 11:02:56 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1999-11-12 11:02:56 +0000 |
commit | 035349a40dd7d6fde2cb6176dcf229a09f9087b3 (patch) | |
tree | 5d0518ecd9663e70b087e4a71c2c9a57ac94f258 /gas/macro.c | |
parent | c1eae11499c60c61b6aaa5fa5e316613dcb0b6ad (diff) | |
download | binutils-gdb-035349a40dd7d6fde2cb6176dcf229a09f9087b3.tar.gz |
do not look beyond the end of the buffer
Diffstat (limited to 'gas/macro.c')
-rw-r--r-- | gas/macro.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/macro.c b/gas/macro.c index 2ef4cb400f8..1c33de3a229 100644 --- a/gas/macro.c +++ b/gas/macro.c @@ -246,10 +246,10 @@ buffer_and_nest (from, to, ptr, get_line) if (ptr->ptr[i] == '.') i++; if (strncasecmp (ptr->ptr + i, from, from_len) == 0 - && ! isalnum (ptr->ptr[i + from_len])) + && (ptr->len == (i + from_len || ! isalnum (ptr->ptr[i + from_len])))) depth++; if (strncasecmp (ptr->ptr + i, to, to_len) == 0 - && ! isalnum (ptr->ptr[i + to_len])) + && (ptr->len == (i + to_len) || ! isalnum (ptr->ptr[i + to_len]))) { depth--; if (depth == 0) |