qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Laurent Vivier <laurent@vivier.eu>
Subject: Re: [PATCH 1/2] linux-user/gen-vdso: Handle fseek() failure
Date: Thu, 10 Jul 2025 11:43:31 -0600	[thread overview]
Message-ID: <d7e76007-10f4-4507-a2cd-1707ca6a8918@linaro.org> (raw)
In-Reply-To: <20250710170707.1299926-2-peter.maydell@linaro.org>

On 7/10/25 11:07, Peter Maydell wrote:
> 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>
> ---
>   linux-user/gen-vdso.c | 11 +++++++++--
>   1 file changed, 9 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2025-07-10 18:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-10 17:07 [PATCH 0/2] linux-user/gen-vdso: minor error handling improvements Peter Maydell
2025-07-10 17:07 ` [PATCH 1/2] linux-user/gen-vdso: Handle fseek() failure Peter Maydell
2025-07-10 17:43   ` Richard Henderson [this message]
2025-07-10 17:07 ` [PATCH 2/2] linux-user/gen-vdso: Don't write off the end of buf[] Peter Maydell
2025-07-10 17:46   ` Richard Henderson
2025-07-10 19:31   ` Peter Maydell
2025-07-10 17:58 ` [PATCH 0/2] linux-user/gen-vdso: minor error handling improvements Richard Henderson
2025-07-10 19:31   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7e76007-10f4-4507-a2cd-1707ca6a8918@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).