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é <f4...@amsat.org> 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 <gr...@kaod.org> > > > > > > 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. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature