qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [for-2.11 PATCH 04/26] spapr_drc: use g_strdup_printf()


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [for-2.11 PATCH 04/26] spapr_drc: use g_strdup_printf() instead of snprintf()
Date: Mon, 31 Jul 2017 11:57:16 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 07/31/2017 09:53 AM, David Gibson wrote:
On Mon, Jul 31, 2017 at 12:34:41PM +0200, Greg Kurz wrote:
On Mon, 31 Jul 2017 07:11:45 -0300
Philippe Mathieu-Daudé <address@hidden> wrote:

Hi David,

On 07/26/2017 12:58 AM, David Gibson wrote:
On Tue, Jul 25, 2017 at 07:58:53PM +0200, Greg Kurz wrote:
Passing a stack allocated buffer of arbitrary length to snprintf()
without checking the return value can cause the resultant strings
to be silently truncated.

Signed-off-by: Greg Kurz <address@hidden>

Applied to ppc-for-2.11.

Isn't it 2.10 material?


Hi Philippe,

Well... this patch doesn't fix any bug actually since the stack buffers
are large enough. It is more a question of coding style.

Something like below would have been more appropriate I guess:

"Building strings with g_strdup_printf() is a QEMU common practice."

No big deal.

Exactly.  It's not a bugfix, so it doesn't go into 2.10 - we've passed
the hard freeze.

Fair enough :)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]