Calling testing tools bundled with GnuTLS with malformed arguments
could lead to crashing them.
This change makes the error path of option parsing more robust.
Fixes: #1823
Reported-by: Joshua Rogers of AISLE Research Team <joshua@joshua.hu>
Co-authored-by: Joshua Rogers of AISLE Research Team <joshua@joshua.hu>
Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
static void clear_options(struct options_st *options)
{
- for (size_t i = 0; options->length; i++) {
+ for (size_t i = 0; i < options->length; i++) {
clear_option(&options->data[i]);
}
}