mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Fix oob memory access in expand's call to trim()
This commit is contained in:
parent
4e48b084d7
commit
ee069baf42
1 changed files with 1 additions and 1 deletions
|
@ -937,7 +937,7 @@ static expand_error_t expand_braces(const wcstring &instr, expand_flags_t flags,
|
|||
assert(pos >= item_begin);
|
||||
size_t item_len = pos - item_begin;
|
||||
wcstring item = wcstring(item_begin, item_len);
|
||||
item = trim(item, (const wchar_t[]) { BRACE_SPACE });
|
||||
item = trim(item, (const wchar_t[]) { BRACE_SPACE, nullptr });
|
||||
for (auto &c : item) {
|
||||
if (c == BRACE_SPACE) {
|
||||
c = ' ';
|
||||
|
|
Loading…
Reference in a new issue