projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0417426
)
PR23940, check bounds before using
author
Wu Heng
<wu.heng@zte.com.cn>
Fri, 25 Jan 2019 03:11:47 +0000
(13:41 +1030)
committer
Alan Modra
<amodra@gmail.com>
Fri, 25 Jan 2019 04:29:42 +0000
(14:59 +1030)
PR gas/23940
* macro.c (getstring): Check array bound before accessing.
gas/ChangeLog
patch
|
blob
|
history
gas/macro.c
patch
|
blob
|
history
diff --git
a/gas/ChangeLog
b/gas/ChangeLog
index a930a842424cf2ab934910af6abd7e75006aad1a..50eea849d00930f49adabc7c584aff9dcb4e759e 100644
(file)
--- a/
gas/ChangeLog
+++ b/
gas/ChangeLog
@@
-1,3
+1,8
@@
+2019-01-25 Wu Heng <wu.heng@zte.com.cn>
+
+ PR gas/23940
+ * macro.c (getstring): Check array bound before accessing.
+
2019-01-25 Alan Modra <amodra@gmail.com>
PR 20902
diff --git
a/gas/macro.c
b/gas/macro.c
index 68ae04b010b5ee87feabed517e6c871a72e8a7ff..5f41c13cb80fcd80de3ce93fa6076bce88224ad9 100644
(file)
--- a/
gas/macro.c
+++ b/
gas/macro.c
@@
-285,8
+285,8
@@
getstring (size_t idx, sb *in, sb *acc)
{
int nest = 0;
idx++;
- while (
(in->ptr[idx] != '>' || nest)
- &&
idx < in->len
)
+ while (
idx < in->len
+ &&
(in->ptr[idx] != '>' || nest)
)
{
if (in->ptr[idx] == '!')
{