Skip to content

Commit

Permalink
[PATCH] USB: fix buffer size limiting in skeleton driver
Browse files Browse the repository at this point in the history
Fix buffer size limiting.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Olav Kongas authored and Greg Kroah-Hartman committed Jan 4, 2006
1 parent f5691d7 commit cb5b3f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/usb-skeleton.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static ssize_t skel_write(struct file *file, const char *user_buffer, size_t cou
int retval = 0;
struct urb *urb = NULL;
char *buf = NULL;
size_t writesize = max(count, MAX_TRANSFER);
size_t writesize = min(count, MAX_TRANSFER);

dev = (struct usb_skel *)file->private_data;

Expand Down

0 comments on commit cb5b3f6

Please sign in to comment.