Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afb36aec authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 0f0132aa 3e674f80
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -162,7 +162,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;