diff --git a/CHANGES.txt b/CHANGES.txt index 2dcda40380f2356bdae5873fc64fef9c41e620b4..0b8846289e95eabefc20c97b1311664ed38cd44b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,8 @@ ---------------- VERSION 3.1.0 -------------- 10/26/08: Update: Removed 'docs' files and moved them to the wiki. +11/11/08: Bug Fix: Fixed crashing bug in ifind on FAT file system. Bug: 2265927 + ---------------- VERSION 3.0.0 -------------- 0/00/00: Update: Many, many, many API changes. diff --git a/tsk3/fs/ifind_lib.c b/tsk3/fs/ifind_lib.c index 78e20a8e61d697f88d918a9cca73e6cdd065080f..b7932921c1fdce8c2a0ce61cffbeb0bd3b6fcc8f 100644 --- a/tsk3/fs/ifind_lib.c +++ b/tsk3/fs/ifind_lib.c @@ -246,7 +246,7 @@ tsk_fs_path2inum(TSK_FS_INFO * a_fs, const char *a_path, */ if (TSK_FS_TYPE_ISFFS(a_fs->ftype) || TSK_FS_TYPE_ISEXT(a_fs->ftype)) { - if (strcmp(fs_file->name->name, cur_dir) == 0) { + if ((fs_file->name->name) && (strcmp(fs_file->name->name, cur_dir) == 0)) { found_name = 1; } } @@ -254,18 +254,18 @@ tsk_fs_path2inum(TSK_FS_INFO * a_fs, const char *a_path, * the short name */ else if (TSK_FS_TYPE_ISFAT(a_fs->ftype)) { - if (strcasecmp(fs_file->name->name, cur_dir) == 0) { + if ((fs_file->name->name) && (strcasecmp(fs_file->name->name, cur_dir) == 0)) { found_name = 1; } - else if (strcasecmp(fs_file->name->shrt_name, - cur_dir) == 0) { + else if ((fs_file->name->shrt_name) && (strcasecmp(fs_file->name->shrt_name, + cur_dir) == 0)) { found_name = 1; } } /* NTFS gets a case insensitive comparison */ else if (TSK_FS_TYPE_ISNTFS(a_fs->ftype)) { - if (strcasecmp(fs_file->name->name, cur_dir) == 0) { + if ((fs_file->name->name) && (strcasecmp(fs_file->name->name, cur_dir) == 0)) { /* ensure we have the right attribute name */ if (cur_attr == NULL) { found_name = 1; @@ -282,8 +282,8 @@ tsk_fs_path2inum(TSK_FS_INFO * a_fs, const char *a_path, if (!fs_attr) continue; - if (strcasecmp(fs_attr->name, - cur_attr) == 0) { + if ((fs_attr->name) && (strcasecmp(fs_attr->name, + cur_attr) == 0)) { found_name = 1; } }