Status hilite menu retry limit
Fuzzer got stuck here for a very long time, so bail out from the status hilite menu after few failed tries.
This commit is contained in:
@@ -3637,6 +3637,7 @@ status_hilite_menu_add(int origfld)
|
|||||||
unsigned long cond = 0UL;
|
unsigned long cond = 0UL;
|
||||||
char colorqry[BUFSZ];
|
char colorqry[BUFSZ];
|
||||||
char attrqry[BUFSZ];
|
char attrqry[BUFSZ];
|
||||||
|
int retry = 0;
|
||||||
|
|
||||||
choose_field:
|
choose_field:
|
||||||
fld = origfld;
|
fld = origfld;
|
||||||
@@ -3672,6 +3673,10 @@ status_hilite_menu_add(int origfld)
|
|||||||
hilite.behavior = behavior;
|
hilite.behavior = behavior;
|
||||||
|
|
||||||
choose_value:
|
choose_value:
|
||||||
|
if (retry++ > 5) {
|
||||||
|
pline("That's enough tries.");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
if (behavior == BL_TH_VAL_PERCENTAGE
|
if (behavior == BL_TH_VAL_PERCENTAGE
|
||||||
|| behavior == BL_TH_VAL_ABSOLUTE) {
|
|| behavior == BL_TH_VAL_ABSOLUTE) {
|
||||||
char inbuf[BUFSZ], buf[BUFSZ];
|
char inbuf[BUFSZ], buf[BUFSZ];
|
||||||
|
|||||||
Reference in New Issue
Block a user