summaryrefslogtreecommitdiff
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2008-04-15 11:15:15 +0400
committerDavid S. Miller <davem@davemloft.net>2008-04-15 11:15:15 +0400
commit7a8036c2b93c8301afce8f75ac099c347bad569d (patch)
treed15e614a2d989731fe5a32b3de6c35cf5a568737 /net/tipc/socket.c
parenta198d3a200313bca8261e30e6daaad790937fd7e (diff)
downloadlinux-7a8036c2b93c8301afce8f75ac099c347bad569d.tar.xz
[TIPC]: Ignore message padding when receiving stream data
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>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index c1a199c0fa6d..ead22e5eed32 100644
--- 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;