提交 0d5df2df 编写于 作者: R Rich Felker

wordexp must set the we_offs entries of we_wordv to null pointers

上级 bef7a85e
......@@ -139,6 +139,10 @@ static int do_wordexp(const char *s, wordexp_t *we, int flags)
we->we_wordv = wv;
we->we_wordc = i;
for (i=we->we_offs; i; i--)
we->we_wordv[i-1] = 0;
if (flags & WRDE_DOOFFS) we->we_wordc -= we->we_offs;
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册