Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb5b3f69 authored by Olav Kongas's avatar Olav Kongas Committed by Greg Kroah-Hartman
Browse files

[PATCH] USB: fix buffer size limiting in skeleton driver



Fix buffer size limiting.

Signed-off-by: default avatarOlav Kongas <ok@artecdesign.ee>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f5691d70
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;