Don't subtract 4 from the length passed to update_crc10_by_bytes_iuup().
authorGuy Harris <guy@alum.mit.edu>
Fri, 8 Aug 2014 18:29:28 +0000 (11:29 -0700)
committerGuy Harris <guy@alum.mit.edu>
Fri, 8 Aug 2014 18:29:57 +0000 (18:29 +0000)
The length passed to it already has 4 subtracted from it by the caller.

Change-Id: I6e047c6c4c4cd5220be923b4663088b6b275d768
Reviewed-on: https://code.wireshark.org/review/3511
Reviewed-by: Guy Harris <guy@alum.mit.edu>
epan/dissectors/packet-iuup.c

index d5315a8d6e63d52fc6f55321ed6593eb152c1711..e3e27f43498b62266b298765a8704be4bae68a89 100644 (file)
@@ -582,7 +582,7 @@ update_crc10_by_bytes_iuup(tvbuff_t *tvb, int offset, int length)
     guint16 extra_16bits;
     guint8 extra_8bits[2];
 
-    crc10 = update_crc10_by_bytes_tvb(0, tvb, offset + 2, length - 4);
+    crc10 = update_crc10_by_bytes_tvb(0, tvb, offset + 2, length);
     extra_16bits = tvb_get_ntohs(tvb, offset) & 0x3FF;
     extra_8bits[0] = extra_16bits >> 2;
     extra_8bits[1] = (extra_16bits << 6) & 0xFF;