FreeRDP/client
ilammy d7c9a31b4b client/X11: correctly trim terminating null bytes from strings
Sometimes Windows sends strings with excess null terminating bytes.
For example, when one copies digits from calc.exe. At the same time,
some local applications freak out when they encounter null bytes
(at least LibreOffice is known to be replacing them with '#').

According to the specification of UTF8_STRING format [1], the string
data must not contain any trailing null bytes. So they all should be
trimmed, not only the last one.

Also, if the trailing null byte is not present, the length should not
be adjusted. For example, Firefox is actually sending "HTML Format"
without a null byte while Internet Explorer adds one. The spec for
text/html format [2] says nothing about the teminating null byte, so
we are free to remove it, but at least we should not mistakingly
delete '>' character of "</html>" tag when it is the last character.

[1] http://www.pps.univ-paris-diderot.fr/~jch/software/UTF8_STRING/UTF8_STRING.text

[2] https://www.ietf.org/rfc/rfc2854.txt
2015-11-14 19:03:10 +02:00
..
Android Merge pull request #2917 from binglinoioij/master 2015-11-10 10:13:47 +01:00
common settings: update settings/help to match 2015-08-28 11:09:38 +02:00
DirectFB Fixes for malloc / calloc + other fixes 2015-06-22 19:21:47 +02:00
iOS client/ios: fix unchecked strdups 2015-06-22 19:09:59 +02:00
Mac Merge pull request #2825 from akallabeth/pointer_decoding_fix 2015-09-01 11:09:42 +02:00
Sample Fixes for malloc / calloc + other fixes 2015-06-22 19:21:47 +02:00
Wayland Fixed leaks, NULL dereferences and broken init. 2015-06-23 21:29:21 +02:00
Windows libfreerdp-core: fix code style 2015-09-15 10:37:57 -04:00
X11 client/X11: correctly trim terminating null bytes from strings 2015-11-14 19:03:10 +02:00
.gitignore Fixes for malloc / calloc + other fixes 2015-06-22 19:21:47 +02:00
CMakeLists.txt Disabled client builds if WITH_CLIENT is not set. 2015-11-03 17:32:52 +01:00