diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2008-04-15 00:15:15 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-15 00:15:15 -0700 |
commit | 7a8036c2b93c8301afce8f75ac099c347bad569d (patch) | |
tree | d15e614a2d989731fe5a32b3de6c35cf5a568737 /net | |
parent | a198d3a200313bca8261e30e6daaad790937fd7e (diff) |
[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')
-rw-r--r-- | net/tipc/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index c1a199c0fa6..ead22e5eed3 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; |