qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 0/2] block: Fix gcc 7 warnings


From: Stefan Hajnoczi
Subject: Re: [Qemu-block] [PATCH 0/2] block: Fix gcc 7 warnings
Date: Thu, 15 Jun 2017 08:18:08 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

On Tue, Jun 13, 2017 at 07:20:04PM +0200, Max Reitz wrote:
> blkdebug and blkverify use snprintf() to generate a filename; however,
> that may not fit into the target buffer (BDS.exact_filename). If so,
> they generate a truncated and thus pretty much unusable filename. In
> this case it's better to just not generate a filename at all (until we
> have better infrastructure which is not bound by a static buffer size).
> 
> Also, gcc 7 warns about these snprintf() instances and these patches fix
> these warnings. There is another one in hw/usb/bus.c which is not
> addressed by this series.
> 
> Max Reitz (2):
>   blkdebug: Catch bs->exact_filename overflow
>   blkverify: Catch bs->exact_filename overflow
> 
>  block/blkdebug.c  | 10 +++++++---
>  block/blkverify.c | 12 ++++++++----
>  2 files changed, 15 insertions(+), 7 deletions(-)
> 
> -- 
> 2.9.4
> 
> 

Reviewed-by: Stefan Hajnoczi <address@hidden>

Attachment: signature.asc
Description: PGP signature


reply via email to

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