Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8305db0 authored by Martin Schiller's avatar Martin Schiller Committed by Greg Kroah-Hartman
Browse files

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



[ Upstream commit d449ba3d581ed29f751a59792fdc775572c66904 ]

The length of the called and calling address was not calculated
correctly (BCD encoding).

Signed-off-by: default avatarMartin Schiller <ms@dev.tdt.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 69ab25ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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