summary refs log tree commit diff stats
path: root/scripts/tracetool/backend
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-12-03 11:10:44 +0100
committerGerd Hoffmann <kraxel@redhat.com>2018-12-03 19:39:04 +0100
commit6de02a13232a84261bd2d5e07013d6e6572cd60f (patch)
treeae9180f0a0f5c575f45ffff859670b5534ed0f77 /scripts/tracetool/backend
parent039d4e3df0049bdd8f93a2de735a816483b13954 (diff)
downloadfocaccia-qemu-6de02a13232a84261bd2d5e07013d6e6572cd60f.tar.gz
focaccia-qemu-6de02a13232a84261bd2d5e07013d6e6572cd60f.zip
usb-mtp: fix utf16_to_str
Make utf16_to_str return an allocated string.  Remove the assumtion that
the number of string bytes equals the number of utf16 chars (which is
only true for ascii chars).  Instead call wcstombs twice, once to figure
the storage size and once for the actual conversion (as suggested by the
wcstombs manpage).

FIXME: surrogate pairs are not working correctly.  Pre-existing bug,
fixing that is left for another day.

Reported-by: Michael Hanselmann <public@hansmi.ch>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 20181203101045.27976-2-kraxel@redhat.com
Diffstat (limited to 'scripts/tracetool/backend')
0 files changed, 0 insertions, 0 deletions