Go to file
ilammy 93fc349ce6 client/X11: harden xf_cliprdr_parse_server_format_list()
* 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.
2016-02-23 01:20:34 +02:00
channels Fix compiler warnings 2015-11-09 19:26:34 +01:00
ci/cmake-preloads ci: update os x preload 2015-01-27 01:07:07 +01:00
client client/X11: harden xf_cliprdr_parse_server_format_list() 2016-02-23 01:20:34 +02:00
cmake Fixed WITH_CLIENT_CHANNELS dependencies. 2015-11-04 13:15:37 +01:00
docs wlog: change variable naming and fix documentation 2015-11-10 12:05:23 +01:00
external cmake: added external directory 2012-11-01 13:50:49 -04:00
include Add build-config.h 2015-11-09 15:54:22 +01:00
libfreerdp Merge pull request #2970 from bmiklautz/prep_2.0 2015-11-11 12:54:34 +01:00
packaging Correct the included files to have a working freerdp-nightly-dev package 2015-06-11 09:08:12 +02:00
rdtk server: Fix several memory leak while running valgrind on freerdp-shadow 2015-09-17 01:02:22 +08:00
resources Recompressed images with FileOptimizer 6.8 (an open-source mass file recompression tool for Windows) 2014-08-08 20:12:25 -04:00
scripts ios: update openssl build script 2015-06-09 13:02:44 +02:00
server Add build-config.h 2015-11-09 15:54:22 +01:00
third-party build: cmake 3.1 compatibility 2014-12-12 19:26:22 +01:00
winpr winpr/clipboard: add CF_RAW clipboard format ID 2015-11-14 19:03:10 +02:00
.gitignore Add build-config.h 2015-11-09 15:54:22 +01:00
ChangeLog changelog: update for 1.0.1 2012-02-09 21:01:42 -05:00
CMakeCPack.cmake cmake: fix package generation on Mac OS X 2013-09-09 21:42:25 -04:00
CMakeCPackOptions.cmake.in cmake: fix package generation on Mac OS X 2013-09-09 21:42:25 -04:00
CMakeLists.txt Merge pull request #2970 from bmiklautz/prep_2.0 2015-11-11 12:54:34 +01:00
config.h.in Add build-config.h 2015-11-09 15:54:22 +01:00
freerdp.pc.in update and improve pkg-config files 2014-04-23 13:12:23 +02:00
FreeRDPConfig.cmake.in cmake: export to different directory, export more build info 2013-10-29 15:16:44 -04:00
LICENSE FreeRDP 1.0: initial commit 2011-06-30 15:12:51 -04:00
README Updated links in README 2013-05-27 18:29:24 +02:00
winpr.pc.in update and improve pkg-config files 2014-04-23 13:12:23 +02:00

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