Created attachment 11422 [details]
check bounds befroe using
The var "idx" should be checked before using in function "getstring" gas/macro.c:288.
while ((in->ptr[idx] != '>' || nest)
&& idx < in->len)
The out of bounds judgment should be in front of using.
Created attachment 11429 [details]
bug file to reproduce the error
the bound of char* "in->ptr" should be checked first before using!
The master branch has been updated by Alan Modra <firstname.lastname@example.org>:
Author: Wu Heng <email@example.com>
Date: Fri Jan 25 13:41:47 2019 +1030
PR23940, check bounds before using
* macro.c (getstring): Check array bound before accessing.