From 7ea7377f1ae954e1a85b11593ef3cc8bf189507e Mon Sep 17 00:00:00 2001
From: Brian Carrier <carrier@sleuthkit.org>
Date: Wed, 22 Jan 2014 17:14:33 -0500
Subject: [PATCH] Fixed off by 1 error in new ISO sanity check code

---
 tsk/fs/iso9660.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tsk/fs/iso9660.c b/tsk/fs/iso9660.c
index 1a1e236b0..88be9ae86 100644
--- a/tsk/fs/iso9660.c
+++ b/tsk/fs/iso9660.c
@@ -634,7 +634,7 @@ iso9660_load_inodes_dir(TSK_FS_INFO * fs, TSK_OFF_T a_offs, int count,
             in_node->offset =
                 tsk_getu32(fs->endian, dentry->ext_loc_m) * fs->block_size;
             
-            if (tsk_getu32(fs->endian, in_node->inode.dr.data_len_m) + in_node->offset > fs->last_block * fs->block_size) {
+            if (tsk_getu32(fs->endian, in_node->inode.dr.data_len_m) + in_node->offset > fs->block_count * fs->block_size) {
                 if (tsk_verbose)
                     tsk_fprintf(stderr,
                                 "iso9660_load_inodes_dir: file ends past end of image (%"PRIu32" bytes). bailing\n",
-- 
GitLab