mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:54:41 +08:00
PR23940, check bounds before using
PR gas/23940 * macro.c (getstring): Check array bound before accessing.
This commit is contained in:
parent
0417426340
commit
10c172ba93
@ -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
|
||||
|
@ -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] == '!')
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user