aboutsummaryrefslogtreecommitdiff
path: root/module-common.c
diff options
context:
space:
mode:
authorVivian Wang <uwu@dram.page>2024-07-23 18:05:45 +0800
committerRichard Henderson <richard.henderson@linaro.org>2024-07-30 07:59:23 +1000
commit25268a18550323f6babbcc260838fa09941e5c85 (patch)
tree157eec75ba42209af3d7613e3247909576747649 /module-common.c
parent22531d8cc58f390986e7070eca5d1628aa7b2fe0 (diff)
downloadqemu-25268a18550323f6babbcc260838fa09941e5c85.zip
qemu-25268a18550323f6babbcc260838fa09941e5c85.tar.gz
qemu-25268a18550323f6babbcc260838fa09941e5c85.tar.bz2
linux-user/main: Check errno when getting AT_EXECFD
It's possible for AT_EXECFD to end up with a valid value of 0. Check errno when using qemu_getauxval instead of return value to handle this case. Not handling this case leads to a confusing condition where the executable ends up as fd 0, i.e. stdin. Signed-off-by: Vivian Wang <uwu@dram.page> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Fixes: 0b959cf5e4cc ("linux-user: Use qemu_getauxval for AT_EXECFD") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2448 Message-ID: <20240723100545.405476-3-uwu@dram.page> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'module-common.c')
0 files changed, 0 insertions, 0 deletions