From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Radoslaw Biernacki <rad@semihalf.com>,
Leif Lindholm <quic_llindhol@quicinc.com>,
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Subject: Re: [PATCH for-9.2] hw/arm/sbsa-ref: Don't leak string in sbsa_fdt_add_gic_node()
Date: Sun, 25 Aug 2024 22:13:52 +1000 [thread overview]
Message-ID: <f9bfe251-fc5c-4ffc-9842-a13d6fbe8b66@linaro.org> (raw)
In-Reply-To: <795d0c95-9bbe-43f5-bcd4-edcbe00cddc9@linaro.org>
On 8/23/24 16:42, Philippe Mathieu-Daudé wrote:
>> static void sbsa_fdt_add_gic_node(SBSAMachineState *sms)
>> {
>> - char *nodename;
>> + const char *intc_nodename = "/intc";
>> + const char *its_nodename = "/intc/its";
>
> Should we use static qualifiers?'
No. The real object is the string literal. The local variable simply allows multiple
references within the function.
r~
next prev parent reply other threads:[~2024-08-25 12:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 16:23 [PATCH for-9.2] hw/arm/sbsa-ref: Don't leak string in sbsa_fdt_add_gic_node() Peter Maydell
2024-08-23 6:28 ` Philippe Mathieu-Daudé
2024-08-23 6:42 ` Philippe Mathieu-Daudé
2024-08-25 12:13 ` Richard Henderson [this message]
2024-08-27 4:38 ` Gavin Shan
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=f9bfe251-fc5c-4ffc-9842-a13d6fbe8b66@linaro.org \
--to=richard.henderson@linaro.org \
--cc=marcin.juszkiewicz@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quic_llindhol@quicinc.com \
--cc=rad@semihalf.com \
/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).