summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-12-18 12:31:49 +0100
committerBalint Reczey <balint@balintreczey.hu>2015-01-11 17:45:48 +0000
commit74b20dca8c255672259d0c43004665d1e9f192dd (patch)
tree97e5562c9d076f93ff36b0adf4922a6c9cc78c67 /cmake
parentae2888aeb2b418c9f627b553d0022b5250ca16d2 (diff)
downloadwireshark-74b20dca8c255672259d0c43004665d1e9f192dd.tar.gz
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@balintreczey.hu>
Diffstat (limited to 'cmake')
0 files changed, 0 insertions, 0 deletions