nolo: Check return value of sprintf

This commit is contained in:
Pali Rohár committed 2014-10-19 20:17:29 +02:00
1 parent b1564909d7
commit 9a1f63c5ae
1 file changed
+2 -1
+2 -1
View File
@@ -176,7 +176,8 @@ static int nolo_get_version_string(struct usb_device_info * dev, const char * st
if ( strlen(str) > 500 ) if ( strlen(str) > 500 )
return -1; return -1;
sprintf(buf, "version:%s", str); if ( sprintf(buf, "version:%s", str) <= 0 )
return -1;
ret = nolo_get_string(dev, buf, out, size); ret = nolo_get_string(dev, buf, out, size);