Wireshark-bugs: [Wireshark-bugs] [Bug 12973] New: plugin_if_get_ws_info causes Access Violation
Bug ID |
12973
|
Summary |
plugin_if_get_ws_info causes Access Violation if called during rescan
|
Product |
Wireshark
|
Version |
Git
|
Hardware |
x86
|
OS |
Windows 7
|
Status |
UNCONFIRMED
|
Severity |
Major
|
Priority |
Low
|
Component |
Dissection engine (libwireshark)
|
Assignee |
bugzilla-admin@wireshark.org
|
Reporter |
paul.offord@advance7.com
|
Build Information:
Version 2.2.1-Syncro (v2.2.0-57-g8ec2f4b from master-2.2)
Copyright 1998-2016 Gerald Combs <gerald@wireshark.org> and contributors.
License GPLv2+: GNU GPL version 2 or later
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled (64-bit) with Qt 5.5.1, with WinPcap (4_1_3), with GLib 2.42.0, with
zlib 1.2.8, with SMI 0.4.8, with c-ares 1.11.0, with Lua 5.2.4, with GnuTLS
3.2.15, with Gcrypt 1.6.2, with MIT Kerberos, with GeoIP, with QtMultimedia,
with AirPcap.
Running on 64-bit Windows 7 Service Pack 1, build 7601, with locale
English_United Kingdom.1252, with WinPcap version 4.1.3 (packet.dll version
4.1.0.2980), based on libpcap version 1.0 branch 1_0_rel0b (20091008), with
GnuTLS 3.2.15, with Gcrypt 1.6.2, with AirPcap 4.1.0 build 1622.
Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz (with SSE4.2), with 8082MB of physical
memory.
Built using Microsoft Visual C++ 12.0 build 40629
--
If plugin_if_get_ws_info is called whilst a file is being rescanned (say due to
a filter being applied) it causes an Access Violation in
plugin_if_mainwindow_get_ws_info.
if (cf->state == FILE_READ_DONE) {
ws_info->cf_framenr = cf->current_frame->num;
ws_info->frame_passed_dfilter =
(cf->current_frame->flags.passed_dfilter == 1);
} else {
The access violation occurs in the block of code above because
cf->current_frame in NULL during the rescan.
Suggested fix is to change the code as follows:
if (cf->state == FILE_READ_DONE && cf->current_frame) {
ws_info->cf_framenr = cf->current_frame->num;
ws_info->frame_passed_dfilter =
(cf->current_frame->flags.passed_dfilter == 1);
} else {
i.e. simply add a test for a non-NULL cf->current_frame value to the if
statement.
You are receiving this mail because:
- You are watching all bug changes.