aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOlav Kongas <ok@artecdesign.ee>2005-12-22 05:44:52 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-04 16:51:45 -0500
commitcb5b3f6950b4fbad9d8d41756f49aba792804b5b (patch)
tree52359251d2f32767be54ab9e0e5fe2ad69f9a9f1 /drivers
parentf5691d70d4aeec0ac9cff11f0cabb7d5a1735705 (diff)
[PATCH] USB: fix buffer size limiting in skeleton driver
Fix buffer size limiting. Signed-off-by: Olav Kongas <ok@artecdesign.ee> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/usb-skeleton.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index 719d23a4ac51..b6652ef56830 100644
--- a/drivers/usb/usb-skeleton.c
+++ b/drivers/usb/usb-skeleton.c
@@ -166,7 +166,7 @@ static ssize_t skel_write(struct file *file, const char *user_buffer, size_t cou
166 int retval = 0; 166 int retval = 0;
167 struct urb *urb = NULL; 167 struct urb *urb = NULL;
168 char *buf = NULL; 168 char *buf = NULL;
169 size_t writesize = max(count, MAX_TRANSFER); 169 size_t writesize = min(count, MAX_TRANSFER);
170 170
171 dev = (struct usb_skel *)file->private_data; 171 dev = (struct usb_skel *)file->private_data;
172 172