From: Darrick J. Wong Date: Wed, 18 May 2022 02:48:07 +0000 (-0400) Subject: xfs_db: fix a complaint about a printf buffer overrun X-Git-Tag: v5.18.0-rc1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75ff9c671d4e0e6c7ee498e10bcdb40ce37a62c1;p=thirdparty%2Fxfsprogs-dev.git xfs_db: fix a complaint about a printf buffer overrun gcc 11 warns that stack_f doesn't allocate a sufficiently large buffer to hold the printf output. I don't think the io cursor stack is really going to grow to 4 billion levels deep, but let's fix this anyway. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- diff --git a/db/io.c b/db/io.c index 98f4e6050..bfc86cc4a 100644 --- a/db/io.c +++ b/db/io.c @@ -638,7 +638,7 @@ stack_f( char **argv) { int i; - char tagbuf[8]; + char tagbuf[14]; for (i = iocur_sp; i > 0; i--) { snprintf(tagbuf, sizeof(tagbuf), "%d: ", i);