netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/4] irda check error on memcpy_fromiovec (resend)
@ 2004-01-17  1:40 Jean Tourrilhes
  2004-01-17  1:41 ` Chris Wright
  2004-01-20  5:16 ` David S. Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Jean Tourrilhes @ 2004-01-17  1:40 UTC (permalink / raw)
  To: netdev, Chris Wright

Chris Wright wrote :
> Check the return value on memcpy_fromiovec().
> 
>  net/irda/af_irda.c |   18 +++++++++++++++---
>  1 files changed, 15 insertions(+), 3 deletions(-)

	Oups, I must have missed the first edition. I've added this is
my patch queue in case Dave doesn't pick it up, but as you can see I
now have a bit of backlog :
	http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/IrDA.html

	Have fun...

	Jean

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [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; 4+ 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] 4+ messages in thread

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-17  1:40 [PATCH 2/4] irda check error on memcpy_fromiovec (resend) Jean Tourrilhes
2004-01-17  1:41 ` Chris Wright
2004-01-20  5:16 ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2004-01-16 22:25 [PATCH 1/4] ax25 " Chris Wright
2004-01-16 22:26 ` [PATCH 2/4] irda " Chris Wright

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).