qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] block: Fix gcc 7 warnings
@ 2017-06-13 17:20 Max Reitz
  2017-06-13 17:20 ` [Qemu-devel] [PATCH 1/2] blkdebug: Catch bs->exact_filename overflow Max Reitz
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Max Reitz @ 2017-06-13 17:20 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, Philippe Mathieu-Daudé

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-06-16 16:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-13 17:20 [Qemu-devel] [PATCH 0/2] block: Fix gcc 7 warnings Max Reitz
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

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).