Make the frame_data_sequence structure opaque, and move some other
[obnox/wireshark/wip.git] / print.c
diff --git a/print.c b/print.c
index 5089c8dd60f7803255ec7dbeb4c146b11d3c9c43..603acd09c05b98dda27f458e46f041b036e90411 100644 (file)
--- a/print.c
+++ b/print.c
@@ -622,7 +622,7 @@ static gchar *csv_massage_str(const gchar *source, const gchar *exceptions)
 
     csv_str = g_strescape(source, exceptions);
     tmp_str = csv_str;
-    while ( tmp_str = strstr(tmp_str, "\\\"") )
+    while ( (tmp_str = strstr(tmp_str, "\\\"")) != NULL )
         *tmp_str = '\"';
     return csv_str;
 }
@@ -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) {