diff options
author | Gerald Combs <gerald@wireshark.org> | 2011-02-18 19:46:05 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2011-02-18 19:46:05 +0000 |
commit | 3e13ddbadc947658f4f3bf67f8a06746f62519a5 (patch) | |
tree | 5fd3e5f20b20997378ab2e662761a9715c697a47 | |
parent | 0e6aa74d5404c4fe8faa7137fe8db9d91783df2c (diff) |
Fix a few errors found by Clang scan-build.
svn path=/trunk/; revision=36002
-rw-r--r-- | epan/reassemble.c | 3 | ||||
-rw-r--r-- | gtk/find_dlg.c | 2 | ||||
-rw-r--r-- | gtk/packet_list_store.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/epan/reassemble.c b/epan/reassemble.c index 99193fa482..9d796b4ea7 100644 --- a/epan/reassemble.c +++ b/epan/reassemble.c @@ -946,6 +946,9 @@ fragment_add_work(fragment_data *fd_head, tvbuff_t *tvb, const int offset, g_warning("Reassemble error in frame %u: dfpos %u - offset %u > len %u", pinfo->fd->num, dfpos, fd_i->offset, fd_i->len); + else if (!fd_head->data) + g_warning("Reassemble error in frame %u: no data", + pinfo->fd->num); else { if (fd_i->offset < dfpos) { fd_i->flags |= FD_OVERLAP; diff --git a/gtk/find_dlg.c b/gtk/find_dlg.c index d94711832b..527ad7ee8b 100644 --- a/gtk/find_dlg.c +++ b/gtk/find_dlg.c @@ -679,7 +679,7 @@ find_frame_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) statusbar_push_temporary_msg("No packet contained that string in its dissected display."); return; } - } else if (cfile.packet_data) { + } else if (cfile.packet_data && string) { /* String in the ASCII-converted packet data */ found_packet = cf_find_packet_data(&cfile, string, strlen(string), cfile.dir); g_free(string); diff --git a/gtk/packet_list_store.c b/gtk/packet_list_store.c index 3eccc9e1d1..4375837f0f 100644 --- a/gtk/packet_list_store.c +++ b/gtk/packet_list_store.c @@ -713,7 +713,7 @@ packet_list_change_record(PacketList *packet_list, guint row, gint col, column_i case COL_8021Q_VLAN_ID: case COL_EXPERT: case COL_FREQ_CHAN: - if (cinfo->col_data[col] != cinfo->col_buf[col]) { + if (cinfo->col_data[col] && cinfo->col_data[col] != cinfo->col_buf[col]) { /* This is a constant string, so we don't have to copy it */ record->fdata->col_text[col] = (gchar *) cinfo->col_data[col]; record->fdata->col_text_len[col] = (guint) strlen(record->fdata->col_text[col]); |