From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-ppc@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH qemu] ppc/vof: Fix uninitialized string tracing
Date: Wed, 20 Apr 2022 16:16:58 -0300 [thread overview]
Message-ID: <eb9c179e-e4bd-e456-6545-68294482b33c@gmail.com> (raw)
In-Reply-To: <20220406045013.3610172-1-aik@ozlabs.ru>
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,
Daniel
On 4/6/22 01:50, Alexey Kardashevskiy wrote:
> There are error paths which do not initialize propname but the trace_exit
> label prints it anyway. This initializes the problem string.
>
> Spotted by Coverity CID 1487241.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> hw/ppc/vof.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c
> index 2b63a6287561..5ce3ca32c998 100644
> --- a/hw/ppc/vof.c
> +++ b/hw/ppc/vof.c
> @@ -294,7 +294,7 @@ static uint32_t vof_setprop(MachineState *ms, void *fdt, Vof *vof,
> uint32_t nodeph, uint32_t pname,
> uint32_t valaddr, uint32_t vallen)
> {
> - char propname[OF_PROPNAME_LEN_MAX + 1];
> + char propname[OF_PROPNAME_LEN_MAX + 1] = "";
> uint32_t ret = PROM_ERROR;
> int offset, rc;
> char trval[64] = "";
prev parent reply other threads:[~2022-04-20 19:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 4:50 [PATCH qemu] ppc/vof: Fix uninitialized string tracing Alexey Kardashevskiy
2022-04-06 14:51 ` Daniel Henrique Barboza
2022-04-20 19:16 ` Daniel Henrique Barboza [this message]
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=eb9c179e-e4bd-e456-6545-68294482b33c@gmail.com \
--to=danielhb413@gmail.com \
--cc=aik@ozlabs.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).