mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 23:23:09 +00:00
PR23940, check bounds before using
PR gas/23940 * macro.c (getstring): Check array bound before accessing.
This commit is contained in:
@@ -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>
|
2019-01-25 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 20902
|
PR 20902
|
||||||
|
|||||||
@@ -285,8 +285,8 @@ getstring (size_t idx, sb *in, sb *acc)
|
|||||||
{
|
{
|
||||||
int nest = 0;
|
int nest = 0;
|
||||||
idx++;
|
idx++;
|
||||||
while ((in->ptr[idx] != '>' || nest)
|
while (idx < in->len
|
||||||
&& idx < in->len)
|
&& (in->ptr[idx] != '>' || nest))
|
||||||
{
|
{
|
||||||
if (in->ptr[idx] == '!')
|
if (in->ptr[idx] == '!')
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user