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>
---
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Ryan Hope | reiser4 for 2.6.27-rc1 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Pierre Ossman | [RFC][PATCH] cpuidle: avoid singing capacitors |
| Rafael J. Wysocki | 2.6.26-rc9-git12: Reported regressions from 2.6.25 |
git: | |
| Marius Storm-Olsen | Stats in Git |
| Jakub Narebski | [PATCH] gitweb: Use File::Find::find in git_get_projects_list |
| Johannes Schindelin | [PATCH 01/15] Mark strings for translation. |
| Linus Torvalds | Re: git and larger trees, not so fast? |
| Richard Stallman | Real men don't attack straw men |
| Steven Surdock | Problems with second ipsec(ctl) tunnel |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Bertram Scharpf | First install: Grub doesn't find partitions |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Stephen Pierce | SLS |
| Les Andrzejewski | X386/WD90C31/SUMSUNG SYNC MASTER 4 |
| Sander van Malssen | uemacs |
