Fix off-by-one error in escape_string()

Github: fixes openvpn/openvpn-gui#548

Signed-off-by: Selva Nair <selva.nair@gmail.com>
pull/683/head
Selva Nair 8 months ago committed by Lev Stipakov
parent 9c0c488890
commit fdf457d3a6

@ -208,7 +208,7 @@ escape_string(const char *input)
return NULL; return NULL;
} }
out = buf; out = buf;
memmove(out + pos + 1, out + pos, len - pos + 1); memmove(out + pos + 1, out + pos, len - pos);
out[pos] = '\\'; out[pos] = '\\';
pos += 1; pos += 1;
} }

Loading…
Cancel
Save