Skip to content

block: Fix gcc 7 warnings

Max Reitz qemu-devel 1 version Applied

Status from this message: Applied to my block branch:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2blkdebug: Catch bs->exact_filename overflowblock/blkdebug.c+7 -30 replies
2/2blkverify: Catch bs->exact_filename overflowblock/blkverify.c+8 -40 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlberto GarciaStefan Hajnoczi
SeriesR-b R-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/2] block: Fix gcc 7 warnings

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(-)
Signature · 1 line
2.9.4