On 03/10/2014 11:28 AM, Krzysztof Opasiak wrote: >> From: Robert Baldyga [mailto:r.baldyga@xxxxxxxxxxx] >>> +static int usbg_remove_file(char *path, char *name) >>> +{ >>> + int ret; >>> + char buf[USBG_MAX_PATH_LENGTH]; >>> + >>> + sprintf(buf, "%s/%s", path, name); >> >> Maybe snprintf would be better? > > There is much more sprintf in library. All those functions will be > replaced with snprintf when removing satic buffers and handling > overflows. So it is future work in whole library static buffer usage just begs for snprintf()-like function. It's an error to use sprintf in this case unless you control length of supplied variables (path and name). Cheers, -- Karol Lewandowski, Samsung R&D Institute Poland -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html