From Vincent Helfre:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 14 Sep 2010 14:24:39 +0000 (14:24 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 14 Sep 2010 14:24:39 +0000 (14:24 +0000)
Incorrect decoding of List of ARFCN in BCCH frequency list.
When the range 1024 is selected, it can happen that 2 bytes need to be read for
W1, and also for W2. In the current version, when W1 ends on a byte boundary,
W2 will get an incorrect value, since it will be truncated by 1 bit.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5214

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

epan/dissectors/packet-gsm_a_rr.c

index 30ee37fe9f7480b6653fb192da942804495ef649..c49fac8e6364429e7c6f4d944964dee2210bff76 100644 (file)
@@ -5,7 +5,7 @@
  * In association with Telos Technology Inc.
  *
  * Added Dissection of Radio Resource Management Information Elements
- * and othere enhancements and fixes.
+ * and other enhancements and fixes.
  * Copyright 2005 - 2006, Anders Broman [AT] ericsson.com
  *
  * Title               3GPP                    Other
@@ -882,7 +882,7 @@ static void dissect_channel_list_n_range(tvbuff_t *tvb, proto_tree *tree, guint3
     for (i=1; i<=imax; i++) {
         wi = octet & ~(0xff<<bits);     /* mask "bits" low bits to start wi from existing octet */
         wbits = bits;
-        if (wsize>wbits) {              /* need to extract more bits from the next octet */
+        while (wsize>wbits) {       /* need to extract more bits from the next octet */
             octet = tvb_get_guint8(tvb, curr_offset++);
             wi = (wi << 8) + octet;
             bits = 8;