diff options
author | Paul Offord <paul.offord@advance7.com> | 2015-11-29 22:49:46 +0000 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-12-01 21:12:49 +0000 |
commit | f15bc8f78eae74bca57ebf7063b6a7b1979c5c08 (patch) | |
tree | a644f18e3ade548f50a717f3cfd70227a481d037 /file.c | |
parent | dde90234c9665cfb2c6175240bcd68b060f7cf41 (diff) |
Fix to avoid protection exception in cf_goto_frame
A call to plugin_if_goto_frame when there is no capture file
loaded causes a protection exception in cf_goto_file. This
fix avoids that problem.
Bug: 11810
Change-Id: I7e6f31690a4b0d8d4252b41d8d438979cb253050
Reviewed-on: https://code.wireshark.org/review/12306
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3474,6 +3474,12 @@ 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*/ + statusbar_push_temporary_msg("There is no file loaded"); + return FALSE; /* we failed to go to that packet */ + } + fdata = frame_data_sequence_find(cf->frames, fnumber); if (fdata == NULL) { |