]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
logprint: fix inode fork print record overrun
authorDave Chinner <dchinner@redhat.com>
Sun, 10 May 2015 23:31:14 +0000 (09:31 +1000)
committerDave Chinner <david@fromorbit.com>
Sun, 10 May 2015 23:31:14 +0000 (09:31 +1000)
logprint checks for whether the inode log item extends across a log
record boundary so that it doesn't try to dereference beyond the ned
of the buffer containing the log items. It doesn' however, take into
account log items with attribute forks in them, and so doesn't catch
the overrun in this case. Fix it.

reported-by: Alexander Tsvetkov <alexander.tsvetkov@oracle.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
logprint/log_misc.c

index 521ab66a69ffaa4ad5eda4c12c2f2c9ea81e2e3b..e4f217428d854e3efe3a2e27c3c0bded2cfa616e 100644 (file)
@@ -698,7 +698,7 @@ xlog_print_trans_inode(
     xlog_print_trans_inode_core(&dino);
     *ptr += xfs_icdinode_size(dino.di_version);
 
-    if (*i == num_ops-1 && f->ilf_size == 3)  {
+    if (*i == num_ops-1 && f->ilf_size >= 3) {
        return 1;
     }