Avoid format truncation
PATCH 1/1 Avoid format truncation
io.c:644:17: note: ‘snprintf’ output between 4 and 14 bytes into a destination of size 8
Signed-off-by Boian Bonev <[email protected]>
--- db/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
db/io.c +1 -1
@@ -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);
Signature · 1 line
2.33.1
Quoted 3 lines · Boian Bonev
io.c:644:17: note: ‘snprintf’ output between 4 and 14 bytes into a destination of size 8
Signed-off-by Boian Bonev <[email protected]>
I really hope nobody ever gets to a cursor depth of 4 billion, but the logic is correct, so...
Reviewed-by Darrick J. Wong <[email protected]>
--D
Quoted 20 lines
--- db/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)db/io.c +1
-1@@ -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);Signature · 1 line
2.33.1