[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bluetooth-dev] Bug in l2cap.c ??



"M. B. Anand" wrote:

> Hi,
> There seems to be a bug in l2cap.c in l2cap_receive data() at lines
> 612 and 625.
> I am using the 2000/11/15 version with the gmcnutt generic endian-
> handling patch.
>
> The lines read
> 612: get_upper(CHAR2INT16(pkt->data[1], pkt->data[0]))->
>             receive_data(con, pkt->data + 2, pkt->len - 2);
>
> and
> 625: process_frame(con, pkt->data, pkt->len);
>
> Shouldn't pkt->len here actually be pkt_len ?
>
> pkt->len has been converted to handle big-endianness earlier in the
> function at line 586
> 586: pkt_len = le16_to_cpu(pkt->len)
>

You mean pkt_len has been converted, right? And I think you're probably right.
No one will notice unless they try to use the code on a big-endian processor.

--gmcnutt

-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com