Added a sanity check in output_fields_set_option.

Coverity 552.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36351 f5534014-38df-0310-8fa8-9805f1628bb7
This commit is contained in:
stig 2011-03-26 15:39:35 +00:00
parent c50452d27d
commit 0141fb2dcd
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) {