about summary refs log tree commit diff
path: root/src/misc/getresgid.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-11-22 15:48:24 -0500
committerRich Felker <dalias@aerifal.cx>2013-11-22 15:48:24 -0500
commit8253f59eae7bdb8b5a0f5b87212671564882d1f0 (patch)
treef746ef5bf47a9aae9a7779af139222b85c111204 /src/misc/getresgid.c
parentd8f1908b821098f7a2ff03fbf6b152fe13023057 (diff)
downloadmusl-8253f59eae7bdb8b5a0f5b87212671564882d1f0.tar.gz
musl-8253f59eae7bdb8b5a0f5b87212671564882d1f0.tar.xz
musl-8253f59eae7bdb8b5a0f5b87212671564882d1f0.zip
fix resource exhaustion and zero-word cases in wordexp
when WRDE_NOSPACE is returned, the we_wordv and we_wordc members must
be valid, because the interface contract allows them to return partial
results.

in the case of zero results (due either to resource exhaustion or a
zero-word input) the we_wordv array still should contain a terminating
null pointer and the initial we_offs null pointers. this is impossible
on resource exhaustion, so a correct application must presumably check
for a null pointer in we_wordv; POSIX however seems to ignore the
issue. the previous code may have crashed under this situation.
Diffstat (limited to 'src/misc/getresgid.c')
0 files changed, 0 insertions, 0 deletions