1
0
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:
Kalle Olavi Niemitalo 2007-05-27 19:18:44 +03:00 committed by Witold Filipczyk
parent 62257c20af
commit dafba56f7e

View File

@ -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];
} }