]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_logprint: fix pointer bug
authorDarrick J. Wong <djwong@kernel.org>
Tue, 9 Dec 2025 20:57:38 +0000 (12:57 -0800)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 17 Dec 2025 11:50:47 +0000 (12:50 +0100)
generic/055 captures a crash in xfs_logprint due to an incorrect
refactoring trying to increment a pointer-to-pointer whereas before it
incremented a pointer.

Fixes: 5a9b7e95140893 ("logprint: factor out a xlog_print_op helper")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
logprint/log_misc.c

index 16353ebd728f35154afcd6e8b4f385eafbfedd17..8e0589c161b871224f0b8ab942b993ed8d3363a7 100644 (file)
@@ -992,7 +992,7 @@ xlog_print_op(
                        printf("0x%02x ", (unsigned int)**ptr);
                        if (n % 16 == 15)
                                printf("\n");
-                       ptr++;
+                       (*ptr)++;
                }
                printf("\n");
                return true;