mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
Trust the passed size in escape_string_script
This allows it to handle NULs.
This commit is contained in:
parent
ba69f8f71d
commit
338b40bb43
1 changed files with 1 additions and 1 deletions
|
@ -943,7 +943,7 @@ static void escape_string_script(const wchar_t *orig_in, size_t in_len, wcstring
|
|||
return;
|
||||
}
|
||||
|
||||
while (*in != 0) {
|
||||
for (size_t i = 0; i < in_len; i++) {
|
||||
if ((*in >= ENCODE_DIRECT_BASE) && (*in < ENCODE_DIRECT_BASE + 256)) {
|
||||
int val = *in - ENCODE_DIRECT_BASE;
|
||||
int tmp;
|
||||
|
|
Loading…
Reference in a new issue