Merge "usb: gadget: configfs: Replace strncpy with strlcpy"

This commit is contained in:
Linux Build Service Account 2017-04-19 11:41:42 -07:00 committed by Gerrit - the friendly Code Review server
commit 7514c164f1

View file

@ -160,7 +160,7 @@ static int usb_string_copy(const char *s, char **s_copy)
if (!str)
return -ENOMEM;
}
strncpy(str, s, MAX_USB_STRING_WITH_NULL_LEN);
strlcpy(str, s, MAX_USB_STRING_WITH_NULL_LEN);
if (str[ret - 1] == '\n')
str[ret - 1] = '\0';
*s_copy = str;