fix hunger status highlighting text match
Crash triggered by fuzzer. The Null value for not-hungry between "Satiated" and "Hungry" in the array of possible hunger states caused a crash if C++ regex handling was being used. With posixregex, it would pass benignly for tty but crash for curses. I didn't check any other interface.
This commit is contained in:
@@ -2502,6 +2502,8 @@ query_arrayvalue(
|
||||
start_menu(tmpwin, MENU_BEHAVE_STANDARD);
|
||||
|
||||
for (i = arrmin; i < arrmax; i++) {
|
||||
if (!arr[i]) /* the array of hunger status values has a gap ...*/
|
||||
continue; /*... set to Null between Satiated and Hungry */
|
||||
any = cg.zeroany;
|
||||
any.a_int = i + adj;
|
||||
add_menu(tmpwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE,
|
||||
|
||||
Reference in New Issue
Block a user