[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 0/2] block: Fix gcc 7 warnings
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH 0/2] block: Fix gcc 7 warnings |
Date: |
Fri, 16 Jun 2017 18:37:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 2017-06-13 19:20, 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(-)
Applied to my block branch:
https://github.com/XanClic/qemu/commits/block
Max
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH 0/2] block: Fix gcc 7 warnings, Max Reitz, 2017/06/13
- [Qemu-block] [PATCH 1/2] blkdebug: Catch bs->exact_filename overflow, Max Reitz, 2017/06/13
- [Qemu-block] [PATCH 2/2] blkverify: Catch bs->exact_filename overflow, Max Reitz, 2017/06/13
- Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] block: Fix gcc 7 warnings, no-reply, 2017/06/13
- Re: [Qemu-block] [PATCH 0/2] block: Fix gcc 7 warnings, Alberto Garcia, 2017/06/13
- Re: [Qemu-block] [PATCH 0/2] block: Fix gcc 7 warnings, Stefan Hajnoczi, 2017/06/15
- Re: [Qemu-block] [PATCH 0/2] block: Fix gcc 7 warnings,
Max Reitz <=