URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=1d9f3db764bb8cacfb358a0ea84cabb61945182f
Submitter: Balint Reczey (balint@xxxxxxxxxxxxxxx)
Changed: branch: master-1.12
Repository: wireshark
Commits:
1d9f3db by Peter Wu (peter@xxxxxxxxxxxxx):
gtk: fix crash on Broadway GDK backend
The Broadway GDK backend does never sets event->string. This results in
a crash when filter_string_te_key_pressed_cb tries to read its contents.
Since the documentation marks reading the string as deprecated, try to
handle the character conversion here. It is based on
_gdk_x11_event_translate_keyboard_string (from gtk+), but without trying
to interpret Escape as '\033', and without trying to convert control
characters (example: Ctrl + 1). A buffer of 6 bytes is used to hold a
UTF-8 code point (there is no zero terminator, so 7 bytes as found in
the original implementation is unnecessary).
As g_locale_from_utf8 returns dynamically allocated memory, change the
control flow to have a single exit point where pointers are freed as
needed.
Reproduce with gtk3:
$ broadwayd :5
$ GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 wireshark-gtk
(now open http://localhost:8085/ and start typing in the display filter)
Keys tested: e € (AltGr + 5) ü (AltGr + ", u)
In the X11 backend, these still get displayed correctly. In the broadway
backend however, the accents are missing due to a bug in the broadway
implementation.
Change-Id: Ic1f0ee2b87cd573023ee8e966f06489b3b744dcf
Reviewed-on: https://code.wireshark.org/review/5832
Reviewed-by: Balint Reczey <balint@xxxxxxxxxxxxxxx>
(cherry picked from commit 74b20dca8c255672259d0c43004665d1e9f192dd)
Reviewed-on: https://code.wireshark.org/review/6494
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
Actions performed:
from 1ffee38 ieee80211: initialize bssid for data frames
adds 1d9f3db gtk: fix crash on Broadway GDK backend
Summary of changes:
ui/gtk/filter_autocomplete.c | 60 ++++++++++++++++++++++++------------------
1 file changed, 34 insertions(+), 26 deletions(-)