aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2011-03-26 15:39:35 +0000
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2011-03-26 15:39:35 +0000
commit0141fb2dcddd24bf93fa0c7dda1a971f18a2d3b3 (patch)
tree21ee550fe1552e6789f9fab3f5faff756735329f
parentc50452d27d6ec4517442c7b59d93b49693f57be3 (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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/print.c b/print.c
index aedcb2f88e..603acd09c0 100644
--- a/print.c
+++ b/print.c
@@ -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) {