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