GTK: plugin_if_goto_frame can cause an Access Violation
authorPaul Offord <paul.offord@advance7.com>
Sat, 9 Jan 2016 16:45:48 +0000 (16:45 +0000)
committerAlexis La Goutte <alexis.lagoutte@gmail.com>
Sun, 10 Jan 2016 07:02:23 +0000 (07:02 +0000)
This is a fix for bug 11989.  This patch fixes the problem for the
GTK variant of Wireshark and matches the Qt bug reported by
bug 11810 and fixed by change 12306.

Bug: 11989
Change-Id: Ib9af8ba745394ebd31825003361ec637c45d75d6
Reviewed-on: https://code.wireshark.org/review/13152
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
file.c

diff --git a/file.c b/file.c
index ad3363c39b565c840834633e07f4db8e1e7d334b..44ff87b142b82907531d2e53dfe8d47695921108 100644 (file)
--- a/file.c
+++ b/file.c
@@ -3463,8 +3463,8 @@ cf_goto_frame(capture_file *cf, guint fnumber)
 {
   frame_data *fdata;
 
-  if (cf == NULL) {
-    /* we don't have a loaded capture file - fix for bug 11810*/
+  if (cf == NULL || cf->frames == NULL) {
+    /* we don't have a loaded capture file - fix for bugs 11810 & 11989 */
     statusbar_push_temporary_msg("There is no file loaded");
     return FALSE;   /* we failed to go to that packet */
   }