diff options
author | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-03-26 15:39:35 +0000 |
---|---|---|
committer | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-03-26 15:39:35 +0000 |
commit | 0141fb2dcddd24bf93fa0c7dda1a971f18a2d3b3 (patch) | |
tree | 21ee550fe1552e6789f9fab3f5faff756735329f | |
parent | c50452d27d6ec4517442c7b59d93b49693f57be3 (diff) |
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
-rw-r--r-- | print.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) { |