posix: Fix some crashes in wordexp [BZ #18096]
commit31bfe3ef4ea898df606cb6cc59ac72de27002b01
authorJulian Squires <julian@cipht.net>
Wed, 22 Mar 2023 16:39:57 +0000 (22 14:09 -0230)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 28 Mar 2023 13:12:12 +0000 (28 10:12 -0300)
tree731aa1a7af0cc103912488faf36683a9e88ab4ac
parent07dd75589ecbedec5162a5645d57f8bd093a45db
posix: Fix some crashes in wordexp [BZ #18096]

Without these fixes, the first three included tests segfault (on a
NULL dereference); the fourth aborts on an assertion, which is itself
unnecessary.

Signed-off-by: Julian Squires <julian@cipht.net>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
posix/wordexp-test.c
posix/wordexp.c