projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a198d3a
)
[TIPC]: Ignore message padding when receiving stream data
author
Allan Stephens
<allan.stephens@windriver.com>
Tue, 15 Apr 2008 07:15:15 +0000
(
00:15
-0700)
committer
David S. Miller
<davem@davemloft.net>
Tue, 15 Apr 2008 07:15:15 +0000
(
00:15
-0700)
This patch ensures that padding bytes appearing at the end of
an incoming TIPC message are not returned as valid stream data.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c
patch
|
blob
|
blame
|
history
diff --git
a/net/tipc/socket.c
b/net/tipc/socket.c
index c1a199c0fa6d838119bf1cca89df479e75d692eb..ead22e5eed32e20e0116ccb3ca2ceaa9d81911a8 100644
(file)
--- a/
net/tipc/socket.c
+++ b/
net/tipc/socket.c
@@
-1027,7
+1027,7
@@
restart:
if (!err) {
buf_crs = (unsigned char *)(TIPC_SKB_CB(buf)->handle);
- sz =
skb_tail_pointer(buf
) - buf_crs;
+ sz =
(unsigned char *)msg + msg_size(msg
) - buf_crs;
needed = (buf_len - sz_copied);
sz_to_copy = (sz <= needed) ? sz : needed;