Fix off-by-one error in escape_string()

Github: fixes openvpn/openvpn-gui#548

Signed-off-by: Selva Nair <selva.nair@gmail.com>
pull/680/head
Selva Nair 2024-04-16 17:26:34 -04:00
parent 9c0c488890
commit dae8d04330
1 changed files with 1 additions and 1 deletions

2
misc.c
View File

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