projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix potential buffer overrun whilst scanning macro strings.
[deliverable/binutils-gdb.git]
/
gas
/
macro.c
diff --git
a/gas/macro.c
b/gas/macro.c
index a1a2323c5e2d47f0004038bcecdd855047915fcc..68ae04b010b5ee87feabed517e6c871a72e8a7ff 100644
(file)
--- a/
gas/macro.c
+++ b/
gas/macro.c
@@
-369,7
+369,7
@@
get_any_string (size_t idx, sb *in, sb *out)
{
if (in->len > idx + 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx]))
{
- while (!ISSEP (in->ptr[idx]))
+ while (
idx < in->len &&
!ISSEP (in->ptr[idx]))
sb_add_char (out, in->ptr[idx++]);
}
else if (in->ptr[idx] == '%' && macro_alternate)
This page took
0.023964 seconds
and
4
git commands to generate.