netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] ax25 check error on memcpy_fromiovec (resend)
@ 2004-01-16 22:25 Chris Wright
  2004-01-16 22:26 ` [PATCH 2/4] irda " Chris Wright
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wright @ 2004-01-16 22:25 UTC (permalink / raw)
  To: davem; +Cc: netdev, shemminger

Check the return value on memcpy_fromiovec().

 net/ax25/af_ax25.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

===== net/ax25/af_ax25.c 1.36 vs edited =====
--- 1.36/net/ax25/af_ax25.c	Fri Jan  9 01:53:04 2004
+++ edited/net/ax25/af_ax25.c	Fri Jan 16 14:13:54 2004
@@ -1526,7 +1526,12 @@
 	SOCK_DEBUG(sk, "AX.25: Appending user data\n");
 
 	/* User data follows immediately after the AX.25 data */
-	memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len);
+	if (memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len)) {
+		err = -EFAULT;
+		kfree_skb(skb);
+		goto out;
+	}
+
 	skb->nh.raw = skb->data;
 
 	/* Add the PID if one is not supplied by the user in the skb */

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-01-20  5:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-16 22:25 [PATCH 1/4] ax25 check error on memcpy_fromiovec (resend) Chris Wright
2004-01-16 22:26 ` [PATCH 2/4] irda " Chris Wright
2004-01-16 22:27   ` [PATCH 3/4] netrom " Chris Wright
2004-01-16 22:28     ` [PATCH 4/4] rose " Chris Wright
2004-01-20  5:15       ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).