提交 d449ba3d 编写于 作者: M Martin Schiller 提交者: David S. Miller

net/x25: fix called/calling length calculation in x25_parse_address_block

The length of the called and calling address was not calculated
correctly (BCD encoding).
Signed-off-by: NMartin Schiller <ms@dev.tdt.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 90230968
无相关合并请求
......@@ -100,7 +100,7 @@ int x25_parse_address_block(struct sk_buff *skb,
}
len = *skb->data;
needed = 1 + (len >> 4) + (len & 0x0f);
needed = 1 + ((len >> 4) + (len & 0x0f) + 1) / 2;
if (!pskb_may_pull(skb, needed)) {
/* packet is too short to hold the addresses it claims
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部