]> git.ipfire.org Git - thirdparty/qemu.git/commit
linux-user/gen-vdso: Handle fseek() failure
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 10 Jul 2025 17:07:06 +0000 (18:07 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 10 Jul 2025 17:57:35 +0000 (11:57 -0600)
commitff3b0e8d326155e45574dd14de5db6702a32d06e
tree34d341017e2f270dffc4f2f7bdde8066cb394894
parentc4828cb8502d0b2adc39b9cde93df7d2886df897
linux-user/gen-vdso: Handle fseek() failure

Coverity points out that we don't check for fseek() failure in gen-vdso.c,
and so we might pass -1 to malloc(). Add the error checking.

(This is a standalone executable that doesn't link against glib, so
we can't do the easy thing and use g_file_get_contents().)

Coverity: CID 1523742
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250710170707.1299926-2-peter.maydell@linaro.org>
linux-user/gen-vdso.c