From: Dave Chinner Date: Sun, 10 May 2015 23:31:14 +0000 (+1000) Subject: logprint: fix inode fork print record overrun X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=478f7cf6af980a7e3e573401d1006c05cbc8b18f;p=thirdparty%2Fxfsprogs-dev.git logprint: fix inode fork print record overrun 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 Signed-off-by: Dave Chinner --- diff --git a/logprint/log_misc.c b/logprint/log_misc.c index 521ab66a6..e4f217428 100644 --- a/logprint/log_misc.c +++ b/logprint/log_misc.c @@ -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; }