summaryrefslogtreecommitdiff
path: root/usbredirparser
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-09-05 15:31:52 +0200
committerHans de Goede <hdegoede@redhat.com>2013-09-05 16:31:48 +0200
commit64acef2fb9ee025042a95cb6512e93afcfe74831 (patch)
tree6935be467e7bd342643c448b0fa4348d6260ddc4 /usbredirparser
parent451d5be4f9f9cb53f59a46db529d84fd4b4cb95a (diff)
usbredirparser: Improve error logging for invalid packet lengths
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'usbredirparser')
-rw-r--r--usbredirparser/usbredirparser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usbredirparser/usbredirparser.c b/usbredirparser/usbredirparser.c
index 0ea1d71..b60d3f4 100644
--- a/usbredirparser/usbredirparser.c
+++ b/usbredirparser/usbredirparser.c
@@ -974,7 +974,8 @@ int usbredirparser_do_read(struct usbredirparser *parser_pub)
if ((int)parser->header.length < type_header_len ||
((int)parser->header.length > type_header_len &&
!usbredirparser_expect_extra_data(parser))) {
- ERROR("error invalid packet length: %u", parser->header.length);
+ ERROR("error invalid packet type %u length: %u",
+ parser->header.type, parser->header.length);
parser->to_skip = parser->header.length;
parser->header_read = 0;
return -2;