[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1208207794-2229-4-git-send-email-allan.stephens@windriver.com>
Date: Mon, 14 Apr 2008 17:16:30 -0400
From: Allan Stephens <allan.stephens@...driver.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, allan.stephens@...driver.com
Subject: [PATCH 3/7 net-2.6.26] [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@...driver.com>
---
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 c1a199c..ead22e5 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;
--
1.5.3.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists