Skip to content

Commit

Permalink
Fix off-by-one error in escape_string()
Browse files Browse the repository at this point in the history
Github: fixes OpenVPN#548

Signed-off-by: Selva Nair <selva.nair@gmail.com>
  • Loading branch information
selvanair authored and lstipakov committed Apr 18, 2024
1 parent 9c0c488 commit fdf457d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fdf457d

Please sign in to comment.