Wireshark-bugs: [Wireshark-bugs] [Bug 6576] New: Copying line from packet details pane might cra
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6576
Summary: Copying line from packet details pane might crash
application
Product: Wireshark
Version: SVN
Platform: x86-64
OS/Version: Windows 7
Status: NEW
Severity: Minor
Priority: Low
Component: Wireshark
AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
ReportedBy: pontusnyman@xxxxxxxxx
Created an attachment (id=7412)
--> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=7412)
Packet to reproduce and a patch.
Build Information:
Version 1.7.1-my_test_build (SVN Rev 39818 from /trunk)
[...]
Compiled (32-bit) with GTK+ 2.22.1, with Cairo 1.10.2, with Pango 1.28.3, with
GLib 2.26.1, with WinPcap (version unknown), with libz 1.2.5, without POSIX
capabilities, with SMI 0.4.8, with c-ares 1.7.1, with Lua 5.1, without Python,
with GnuTLS 2.10.3, with Gcrypt 1.4.6, with MIT Kerberos, with GeoIP, with
PortAudio V19-devel (built Nov 13 2011), with AirPcap.
Running on 64-bit Windows 7 Service Pack 1, build 7601, with WinPcap version
4.1.2 (packet.dll version 4.1.0.2001), based on libpcap version 1.0 branch
1_0_rel0b (20091008), GnuTLS 2.10.3, Gcrypt 1.4.6, without AirPcap.
Built using Microsoft Visual C++ 10.0 build 30319
[...]
--
If a data frame contains extended characters and you try to copy such line by
value from the packet details pane the application crashes.
Steps to reproduce:
1. Start application.
2. Load attached capture (bad_packet.pcap).
3. Extend subtree "line-based text data" in packet details pane.
4. Select last row.
5. Right-click to toggle context menu.
6. Select Copy -> Value.
7. Application crashes.
The bug can be found in v1.6.3 (probably also before) and in the Subversion
trunk.
The problem seems to be the function copy_to_clipboard in gui_utils.c where the
function gtk_clipboard_set_text doesn't like extended characters (who does?). I
tried to figure out some elegant unicode way to solve the problem, but I am not
that familiar with glib/GTK (or the Wireshark source code). I am not sure it is
easily fixed, Wireshark doesn't look to unicode friendly.
An easy fix could be to just replace extended characters with dots in the
clipboard (like in the raw view of a hex editors). See attachment for an
example solution of that.
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.