From 2f27bd9e944cade99abdbb71a500a1233cfe2d11 Mon Sep 17 00:00:00 2001
From: Bolke de Bruin <bolke@xs4all.nl>
Date: Fri, 21 Aug 2020 18:48:49 +0200
Subject: [PATCH] Correct packet size

---
 protocol/common.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/protocol/common.go b/protocol/common.go
index 0e3f7f7..744f334 100644
--- a/protocol/common.go
+++ b/protocol/common.go
@@ -101,7 +101,7 @@ func readHeader(data []byte) (packetType uint16, size uint32, packet []byte, err
 	if len(data) < int(size) {
 		return packetType, size, data[8:], errors.New("data incomplete, fragment received")
 	}
-	return packetType, size, data[8:size-8], nil
+	return packetType, size, data[8:size], nil
 }
 
 // forwards data from a Connection to Transport and wraps it in the rdpgw protocol
-- 
GitLab