diff options
author | Martin Schiller <ms@dev.tdt.de> | 2018-11-27 09:50:27 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-13 08:52:14 +0100 |
commit | 12fc4bcc89ef5b34a8fdd8df6b674e055be09a17 (patch) | |
tree | 39b82a029ea0df0258eb296724c928240bd04d3a /net | |
parent | b7950442f2977363b53d567ab723c92cf47279fb (diff) | |
download | linux-stable-12fc4bcc89ef5b34a8fdd8df6b674e055be09a17.tar.gz linux-stable-12fc4bcc89ef5b34a8fdd8df6b674e055be09a17.tar.bz2 linux-stable-12fc4bcc89ef5b34a8fdd8df6b674e055be09a17.zip |
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: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/x25/af_x25.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index f7f53f9ae7ef..3150648206b6 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -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 |