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

Commit bf988c16 authored by John de la Garza's avatar John de la Garza Committed by Greg Kroah-Hartman
Browse files

usbip:usbip_common.c: check return value of sscanf



Added code to check return value of sscanf.

Signed-off-by: default avatarJohn de la Garza <john@jjdev.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d2b7f4c4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -55,7 +55,8 @@ static ssize_t usbip_debug_store(struct device *dev,
				 struct device_attribute *attr, const char *buf,
				 size_t count)
{
	sscanf(buf, "%lx", &usbip_debug_flag);
	if (sscanf(buf, "%lx", &usbip_debug_flag) != 1)
		return -EINVAL;
	return count;
}
DEVICE_ATTR_RW(usbip_debug);