public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.2 - wanxl unchecked copy_to_user
@ 2000-12-19 22:10 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; only message in thread
From: Arnaldo Carvalho de Melo @ 2000-12-19 22:10 UTC (permalink / raw)
  To: Krzysztof Halasa; +Cc: linux-kernel

Hi,

	Please consider applying, there must well be other things to do on
this failure, please check.

                        - Arnaldo

--- linux-2.2.19-2/drivers/net/wanxl.c	Wed Jun  7 18:26:43 2000
+++ linux-2.2.19-2.acme/drivers/net/wanxl.c	Tue Dec 19 20:05:53 2000
@@ -1088,7 +1088,10 @@
 
 	writel(1, &card->config->valid);
   
-	copy_to_user(data, card->config, sizeof(board_cfg));
+	if (copy_to_user(data, card->config, sizeof(board_cfg))) {
+		wanxl_destroy_card(card, 0);
+		return -EFAULT;
+	}
 	*length=sizeof(board_cfg);
 	card->running=1;
 	return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-20  0:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-19 22:10 [PATCH] 2.2 - wanxl unchecked copy_to_user Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox