Skip to content

Commit ee069ba

Browse files
committed
Fix oob memory access in expand's call to trim()
1 parent 4e48b08 commit ee069ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/expand.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ static expand_error_t expand_braces(const wcstring &instr, expand_flags_t flags,
937937
assert(pos >= item_begin);
938938
size_t item_len = pos - item_begin;
939939
wcstring item = wcstring(item_begin, item_len);
940-
item = trim(item, (const wchar_t[]) { BRACE_SPACE });
940+
item = trim(item, (const wchar_t[]) { BRACE_SPACE, nullptr });
941941
for (auto &c : item) {
942942
if (c == BRACE_SPACE) {
943943
c = ' ';

0 commit comments

Comments
 (0)