Variable target is a place for path to USB function so it should have size USBG_MAX_PATH_LENGTH not USBG_MAX_STR_LENGTH size. Signed-off-by: Krzysztof Opasiak <k.opasiak@xxxxxxxxxxx> --- src/usbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usbg.c b/src/usbg.c index f655675..33dbd92 100644 --- a/src/usbg.c +++ b/src/usbg.c @@ -605,7 +605,7 @@ static int usbg_parse_config_bindings(usbg_config *c) struct dirent **dent; char bpath[USBG_MAX_PATH_LENGTH]; char file_name[USBG_MAX_PATH_LENGTH]; - char target[USBG_MAX_STR_LENGTH]; + char target[USBG_MAX_PATH_LENGTH]; char *target_name; usbg_gadget *g = c->parent; usbg_binding *b; -- 1.7.9.5 -- 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