projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9023096
)
net/x25: fix called/calling length calculation in x25_parse_address_block
author
Martin Schiller
<ms@dev.tdt.de>
Tue, 27 Nov 2018 08:50:27 +0000
(09:50 +0100)
committer
David S. Miller
<davem@davemloft.net>
Thu, 29 Nov 2018 22:25:36 +0000
(14:25 -0800)
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>
net/x25/af_x25.c
patch
|
blob
|
history
diff --git
a/net/x25/af_x25.c
b/net/x25/af_x25.c
index
d49aa79
..
5226a7f
100644
(file)
--- 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