[dm-devel] [PATCH] libmultipath: use asprintf() to allocate prefixed_uuid

Martin Wilck martin.wilck at suse.com
Wed Jan 26 15:39:15 UTC 2022


On Wed, 2022-01-26 at 08:46 +0100, Martin Wilck wrote:
> On Tue, 2022-01-25 at 23:35 -0600, Benjamin Marzinski wrote:
> > gcc 12.0.1 failed building libmultipath due to a format-overflow
> > false
> > positive on 32-bit architectures.  This isn't so surprising as
> > format-overflow=2 is very aggressive in the assumptions it makes
> > about
> > the arguments.  Here, it assumes that mpp->wwid could take up all
> > the
> > space that a pointer could point to, even if I add code to this
> > function
> > to explicitly null terminate mpp->wwid to fit in WWID_SIZE.
> 
> This sounds like a bug in gcc which should be reported.

... and that bug exists already:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104119

Martin





More information about the dm-devel mailing list