Skip to contentSkip to conversation

x.25: x25_rx_call_request() skb->len >= 0 is always true

DISCUSSION Roel Kluin 1 participant 1 message Jan 18, 2009 X.25 stack

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

since skb->len is unsigned this is always true.

vi net/x25/af_x25.c +954

        if (skb->len >= 0) {
                skb_copy_from_linear_data(skb, makex25->calluserdata.cuddata, skb->len);
                makex25->calluserdata.cudlength = skb->len;
        }

shouldn't we instead do something like

if (skb->len < LEN_MAX)

and what should LEN_MAX be?