diff options
author | Domen Puncer <domen@coderock.org> | 2006-02-03 06:04:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-03 11:32:05 -0500 |
commit | abffa7da99b78caaf81a2f519bf9cbd1e8dcbc1d (patch) | |
tree | f28e90613a3f01b9d867adecab778ade0c4fbf85 /drivers/isdn | |
parent | 74adb52797a7cde217a8ceeaf254a5441a42a72c (diff) |
[PATCH] drivers/isdn/sc/ioctl.c: copy_from_user() size fix
A few lines above the patch we have:
char *srec;
srec = kmalloc(SCIOC_SRECSIZE, GFP_KERNEL);
sizeof pointer is probably not meant here.
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/sc/ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c index 3314a5a19854..94c9afb7017c 100644 --- a/drivers/isdn/sc/ioctl.c +++ b/drivers/isdn/sc/ioctl.c | |||
@@ -71,14 +71,14 @@ int sc_ioctl(int card, scs_ioctl *data) | |||
71 | /* | 71 | /* |
72 | * Get the SRec from user space | 72 | * Get the SRec from user space |
73 | */ | 73 | */ |
74 | if (copy_from_user(srec, data->dataptr, sizeof(srec))) { | 74 | if (copy_from_user(srec, data->dataptr, SCIOC_SRECSIZE)) { |
75 | kfree(rcvmsg); | 75 | kfree(rcvmsg); |
76 | kfree(srec); | 76 | kfree(srec); |
77 | return -EFAULT; | 77 | return -EFAULT; |
78 | } | 78 | } |
79 | 79 | ||
80 | status = send_and_receive(card, CMPID, cmReqType2, cmReqClass0, cmReqLoadProc, | 80 | status = send_and_receive(card, CMPID, cmReqType2, cmReqClass0, cmReqLoadProc, |
81 | 0, sizeof(srec), srec, rcvmsg, SAR_TIMEOUT); | 81 | 0, SCIOC_SRECSIZE, srec, rcvmsg, SAR_TIMEOUT); |
82 | kfree(rcvmsg); | 82 | kfree(rcvmsg); |
83 | kfree(srec); | 83 | kfree(srec); |
84 | 84 | ||