ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 2548] wimax UL-MAP ext IE decode error

Date: Mon, 23 Jun 2008 02:23:10 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2548





--- Comment #8 from Martin Mathieson <martin.r.mathieson@xxxxxxxxxxxxxx>  2008-06-23 02:23:09 PDT ---
(In reply to comment #5)
> pletohs defined as this.
> 
> #define pletohs(p) ((guint16)                       \
>                     ((guint16)*((const guint8 *)(p)+1)<<8|  \
>                      (guint16)*((const guint8 *)(p)+0)<<0))
> 
> so when the value in (p) is already network byte order (as in ULMAP), the MACRO
> will get a wrong value no matter whether the machine is LE or BE.
> 

So this macro is just broken, as it reverses the current byte order even if
host order is little endian... ?


> so we should use pntohs.
> 
> 
> we should use the label "CQICH_Alloc_IE" in line 1158 of msg_ulmap.c. 
> 
> The function name do not need to be changed because it is already 
> gint CQICH_Alloc_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset,
> gint length, tvbuff_t *tvb)
> 


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.