1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-22 11:17:19 +00:00

Don't forget to quote \ characters with \.

This commit is contained in:
Warner Losh 2016-05-17 22:52:42 +00:00
parent 7349ea785c
commit 0ac974ec78
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300095

View File

@ -862,7 +862,7 @@ devctl_safe_quote(char *dst, const char *src, size_t len)
return;
while (src != NULL && walker < ep)
{
if (*src == '"') {
if (*src == '"' || *src == '\\') {
if (ep - walker < 2)
break;
*walker++ = '\\';