93fc349ce6
* Make sure that numFormats has reasonable value This will help catching errors like writing -1 as an unsigned number of formats into the serialized stream, or trying to read the property after someone else erroneosly messed with it, or other similar mistakes which would result into reading and then sending garbage to the server. We read the list xf_cliprdr_get_raw_server_formats() from an X window property. Properties generally cannot be larger than 4 KB and each format requires at least 5 bytes (most of them are named, though), which gives us 512-ish limit on the number of formats we can squeeze into the property. However, it's hard to find an application that provides more than 20 formats (I've seen like 15 for MS Office apps), thus I believe we can safely assume than anything that does not fit into a byte means that we are reading garbage rather than a good format list. * Check for the end of stream when reading format names This also prevents reading garbage and getting segmentation faults and Valgrind warnings when somebody somewhere sometimes forgets to put a terminating null character where it belongs. strnlen() and strndup() functions are provided by POSIX.1-2008 which we can reasonably expect to be available in 2016. |
||
---|---|---|
channels | ||
ci/cmake-preloads | ||
client | ||
cmake | ||
docs | ||
external | ||
include | ||
libfreerdp | ||
packaging | ||
rdtk | ||
resources | ||
scripts | ||
server | ||
third-party | ||
winpr | ||
.gitignore | ||
ChangeLog | ||
CMakeCPack.cmake | ||
CMakeCPackOptions.cmake.in | ||
CMakeLists.txt | ||
config.h.in | ||
freerdp.pc.in | ||
FreeRDPConfig.cmake.in | ||
LICENSE | ||
README | ||
winpr.pc.in |
FreeRDP: A Remote Desktop Protocol Implementation ================================================= FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license. Enjoy the freedom of using your software wherever you want, the way you want it, in a world where interoperability can finally liberate your computing experience. Resources --------- Project website: http://www.freerdp.com/ Issue tracker: https://github.com/FreeRDP/FreeRDP/issues Sources: https://github.com/FreeRDP/FreeRDP/ Wiki: https://github.com/FreeRDP/FreeRDP/wiki Downloads and other resources: http://pub.freerdp.com API doc: http://pub.freerdp.com/api/ IRC channel: #freerdp @ irc.freenode.net Mailing list: https://lists.sourceforge.net/lists/listinfo/freerdp-devel Microsoft Open Specifications ----------------------------- Information regarding the Microsoft Open Specifications can be found at: http://www.microsoft.com/openspecifications/ A list of reference documentation is maintained here: https://github.com/FreeRDP/FreeRDP/wiki/Reference-Documentation Compilation ----------- Instructions on how to get started compiling FreeRDP can be found on the wiki: https://github.com/FreeRDP/FreeRDP/wiki/Compilation