HID: i2c-hid: fix ret_count check
authorJiri Kosina <jkosina@suse.cz>
Thu, 6 Dec 2012 09:59:28 +0000 (10:59 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 6 Dec 2012 09:59:28 +0000 (10:59 +0100)
ret_count has to be at least 3, as we have to count the 2 bytes that are used
for the size of the reply. Without this, memcpy() might be called with zero or
negative count.

Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

No differences found