From Vincent Helfre:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 23 Nov 2010 17:33:57 +0000 (17:33 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 23 Nov 2010 17:33:57 +0000 (17:33 +0000)
Bug in tvb_get_bits32(), The last bitshift is too large, which causes the least significant bits to be 0 all the time.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35015 f5534014-38df-0310-8fa8-9805f1628bb7

epan/tvbuff.c

index f1003dcb5ee1c49507818b1c1f1d9bb264243d37..29ab888fa0317dbfbdb2f31b835482b2df5171e8 100644 (file)
@@ -1712,7 +1712,7 @@ tvb_get_bits32(tvbuff_t *tvb, gint bit_offset, const gint no_of_bits, const gboo
                }
                else
                {
-                       tempval = tempval >> (- shift);
+                       tempval = tempval >> (- shift);
                }
                value = value | tempval;
        }