From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, "Max Reitz" <mreitz@redhat.com>,
"Kevin Wolf" <kwolf@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [Qemu-devel] [PATCH 0/2] block: Fix gcc 7 warnings
Date: Tue, 13 Jun 2017 19:20:04 +0200 [thread overview]
Message-ID: <20170613172006.19685-1-mreitz@redhat.com> (raw)
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
next reply other threads:[~2017-06-13 17:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 17:20 Max Reitz [this message]
2017-06-13 17:20 ` [Qemu-devel] [PATCH 1/2] blkdebug: Catch bs->exact_filename overflow Max Reitz
2017-06-13 17:20 ` [Qemu-devel] [PATCH 2/2] blkverify: " Max Reitz
2017-06-13 17:29 ` [Qemu-devel] [PATCH 0/2] block: Fix gcc 7 warnings no-reply
2017-06-13 21:05 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2017-06-15 7:18 ` Stefan Hajnoczi
2017-06-16 16:37 ` [Qemu-devel] " Max Reitz
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=20170613172006.19685-1-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=f4bug@amsat.org \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).