diff options
| author | Jesper Juhl <juhl-lkml@dif.dk> | 2004-09-22 04:24:18 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-22 04:24:18 -0700 |
| commit | 84741e83cbe5762f4bef8d343207da605f3dd582 (patch) | |
| tree | a8d7db605037da071934754b6489fdb8643c4547 | |
| parent | 9cac853e2049ed7137fc5221620689dc5f21982a (diff) | |
[PATCH] check copy_from_user return value in act2000_isa_download
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | drivers/isdn/act2000/act2000_isa.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/isdn/act2000/act2000_isa.c b/drivers/isdn/act2000/act2000_isa.c index e84aa5fb3449..b363d0976465 100644 --- a/drivers/isdn/act2000/act2000_isa.c +++ b/drivers/isdn/act2000/act2000_isa.c @@ -434,7 +434,10 @@ act2000_isa_download(act2000_card * card, act2000_ddef __user * cb) l = (length > 1024) ? 1024 : length; c = 0; b = buf; - copy_from_user(buf, p, l); + if (copy_from_user(buf, p, l)) { + kfree(buf); + return -EFAULT; + } while (c < l) { if (act2000_isa_writeb(card, *b++)) { printk(KERN_WARNING |
