mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
SMJS: Assert that form_number of input_class is in range.
This commit is contained in:
parent
33b5884821
commit
26766defe7
@ -138,6 +138,9 @@ input_get_form_state(JSContext *ctx, JSObject *obj, struct view_state *vs)
|
||||
(JSClass *) &input_class,
|
||||
NULL);
|
||||
|
||||
assert(n >= 0);
|
||||
assert(n < vs->form_info_len);
|
||||
if_assert_failed return NULL;
|
||||
return &vs->form_info[n];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user