Ethereal-dev: [Ethereal-dev] Problem in wiretap/i4btrace.c (ethereal)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Hans Petter Selasky <hselasky@xxxxxxx>
Date: Tue, 19 Apr 2005 20:03:42 +0200
Hi,

Could you have fixed the following problem in ethereal:

File wiretap/i4btrace.c:

#define I4B_HDR_IS_OK(hdr) \
        (!((unsigned)hdr.length < 3 || (unsigned)hdr.unit > 4 || \
            (unsigned)hdr.type > 4 || (unsigned)hdr.dir > 2 || \
            (unsigned)hdr.trunc > 2048))

changed into something like:

#define I4B_HDR_IS_OK(hdr) \
        (!((unsigned)hdr.length < 3 || hdr.unit < 0 || \
            (unsigned)hdr.type > 4 || (unsigned)hdr.dir > 2 || \
            (unsigned)hdr.trunc > 2048))


or maybe check that hdr.unit is less than 256, because the unit numbering of 
portable ISDN devices does not always start at zero! I have an ISDN driver 
that assigns units 6 and 7 to USB devices.

Also ISDN can have more than 4 units. Physically one can have 8 units per ISDN 
cable. By default I4B allows unit numbers up to and including 7.

Yours
  HPS