Added a sanity check in output_fields_set_option.

Coverity 552.

svn path=/trunk/; revision=36351
This commit is contained in:
Stig Bjørlykke 2011-03-26 15:39:35 +00:00
parent 33814e3b39
commit 2e4ae4108f
1 changed files with 3 additions and 0 deletions

View File

@ -1344,6 +1344,9 @@ gboolean output_fields_set_option(output_fields_t* info, gchar* option)
return FALSE; /* Is this guarded against by option parsing? */
}
option_name = strtok(option,"=");
if (!option_name) {
return FALSE;
}
option_value = option + strlen(option_name) + 1;
if(0 == strcmp(option_name, "header")) {
switch(NULL == option_value ? '\0' : *option_value) {