freerdp/core/gcc: channel name hardening
authorNorbert Federa <norbert.federa@thincast.com>
Mon, 30 May 2016 12:40:23 +0000 (14:40 +0200)
committerNorbert Federa <norbert.federa@thincast.com>
Mon, 30 May 2016 12:40:23 +0000 (14:40 +0200)
commit7a42a8dd5bf2a18e2b4ffb67767288307b32fa2f
tree13566228b21232df2024ab6a8f0b018351474a7d
parentca03b510ac07eb6be3d6e2fb91e076ad80a5bd8a
freerdp/core/gcc: channel name hardening

According to [MS-RDPBCGR 2.2.1.3.4.1 Channel Definition Structure]
the channel name must be an 8-byte array containing a null-terminated
collection of seven ANSI characters that uniquely identify the channel.

We did not check if the transmitted name was null-terminated which
could have the usual severe effects on stabiliy and security since
the channel name is used in several functions expecting a null-
terminated string (strlen, printf, etc.)
libfreerdp/core/gcc.c