File freerdp-KB408876.patch of Package freerdp.6948

diff -rup freerdp-2.0.0~git.1463131968.4e66df7.orig/libfreerdp/core/nla.c freerdp-2.0.0~git.1463131968.4e66df7/libfreerdp/core/nla.c
--- freerdp-2.0.0~git.1463131968.4e66df7.orig/libfreerdp/core/nla.c	2016-05-17 12:24:59.000000000 +0200
+++ freerdp-2.0.0~git.1463131968.4e66df7/libfreerdp/core/nla.c	2018-03-18 15:47:26.169318091 +0100
@@ -1484,15 +1484,19 @@ BOOL nla_send(rdpNla* nla)
 int nla_decode_ts_request(rdpNla* nla, wStream* s)
 {
 	int length;
+	UINT32 version = 0;
 
 	/* TSRequest */
 	if (!ber_read_sequence_tag(s, &length) ||
 			!ber_read_contextual_tag(s, 0, &length, TRUE) ||
-			!ber_read_integer(s, &nla->version))
+			!ber_read_integer(s, &version))
 	{
 		return -1;
 	}
 
+	if (version < nla->version)
+		nla->version = version;
+
 	/* [1] negoTokens (NegoData) */
 	if (ber_read_contextual_tag(s, 1, &length, TRUE) != FALSE)
 	{
openSUSE Build Service is sponsored by