aboutsummaryrefslogtreecommitdiffstats
path: root/capture_sync.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-12-26 20:42:23 +0000
committerGuy Harris <guy@alum.mit.edu>2012-12-26 20:42:23 +0000
commit074297d7dd616773a5ba25fbf77c945faf1faf46 (patch)
tree121fd1519dd32875cee252931d2e88975e10aa61 /capture_sync.c
parentd4b622de36c7bf10651aabe725c3637c311071b4 (diff)
Make sure we don't sign-extend the (binary) bytes of the message length.
svn path=/trunk/; revision=46792
Diffstat (limited to 'capture_sync.c')
-rw-r--r--capture_sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/capture_sync.c b/capture_sync.c
index 6cab21434f..1bec93fcd6 100644
--- a/capture_sync.c
+++ b/capture_sync.c
@@ -1520,7 +1520,7 @@ pipe_convert_header(const guchar *header, int header_len, char *indicator, int *
/* convert header values */
*indicator = header[0];
- *block_len = header[1]<<16 | header[2]<<8 | header[3];
+ *block_len = (header[1]&0xFF)<<16 | (header[2]&0xFF)<<8 | (header[3]&0xFF);
}
/* read a message from the sending pipe in the standard format