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 #548

Signed-off-by: Selva Nair <[email protected]>
  • Loading branch information
selvanair committed Apr 17, 2024
1 parent 9c0c488 commit dae8d04
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 dae8d04

Please sign in to comment.