summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS4
-rw-r--r--ChangeLog4
-rw-r--r--configure.in4
-rw-r--r--src/ntfsx.c16
-rw-r--r--src/scrounge.c10
5 files changed, 31 insertions, 7 deletions
diff --git a/AUTHORS b/AUTHORS
index d2e76d6..f9d43fb 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1 +1,5 @@
+AUTHORS:
nielsen@memberwebs.com
+
+PATCHES:
+Marius HillenBrand <marius@sirius.inka.de>
diff --git a/ChangeLog b/ChangeLog
index 48ed55e..73f6ee7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+0.8.6
+ - Don't exit on error reading source drive [Marius Hillenbrand]
+ - Fixed core dump when attribute list, but no MFT loaded [Marius Hillenbrand]
+
0.8.5
- Ported to Linux/FreeBSD
- Support for very fragmented MFTs
diff --git a/configure.in b/configure.in
index c22dc1e..d4d8b1e 100644
--- a/configure.in
+++ b/configure.in
@@ -36,8 +36,8 @@ dnl Nate Nielsen <nielsen@memberwebs.com>
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(scrounge-ntfs, 0.8.5, nielsen@memberwebs.com)
-AM_INIT_AUTOMAKE(scrounge-ntfs, 0.8.5)
+AC_INIT(scrounge-ntfs, 0.8.5c, nielsen@memberwebs.com)
+AM_INIT_AUTOMAKE(scrounge-ntfs, 0.8.5c)
LDFLAGS="$LDFLAGS -L/usr/local/lib"
CFLAGS="$CFLAGS -I/usr/local/include"
diff --git a/src/ntfsx.c b/src/ntfsx.c
index 60ddb66..6008e1a 100644
--- a/src/ntfsx.c
+++ b/src/ntfsx.c
@@ -299,7 +299,7 @@ ntfsx_attribute* ntfsx_attrib_enum_list(ntfsx_attrib_enum* attrenum, ntfsx_recor
/* If we're done */
if(attrenum->_flags & ATTR_ENUM_DONELIST)
return NULL;
-
+
cluster = ntfsx_record_cluster(record);
rechead = ntfsx_record_header(record);
@@ -323,10 +323,17 @@ ntfsx_attribute* ntfsx_attrib_enum_list(ntfsx_attrib_enum* attrenum, ntfsx_recor
attrenum->_flags |= ATTR_ENUM_DONELIST;
return NULL;
}
+
+ /* We don't do attribute lists when no MFT loaded */
+ if(!record->info->mftmap)
+ {
+ warnx("extended file attributes, but no MFT loaded. skipping");
+ attrenum->_flags |= ATTR_ENUM_DONELIST;
+ return NULL;
+ }
}
/* This has to be set by now */
- ASSERT(record->info->mftmap);
ASSERT(attrenum->_attrhead);
ASSERT(attrenum->_attrhead->type == kNTFS_ATTRIBUTE_LIST);
@@ -454,7 +461,10 @@ bool ntfsx_record_read(ntfsx_record* record, uint64 begSector, int dd)
ntfs_recordheader* rechead;
if(!ntfsx_cluster_read(&(record->_clus), record->info, begSector, dd))
- err(1, "couldn't read mft record from drive");
+ {
+ warn("couldn't read mft record from drive");
+ return false;
+ }
/* Check and validate this record */
rechead = ntfsx_record_header(record);
diff --git a/src/scrounge.c b/src/scrounge.c
index 7dd7134..e446e58 100644
--- a/src/scrounge.c
+++ b/src/scrounge.c
@@ -406,7 +406,10 @@ void processMFTRecord(partitioninfo* pi, uint64 sector, uint32 flags)
dataSector = CLUSTER_TO_SECTOR(*pi, (datarun->cluster + i));
if(!ntfsx_cluster_read(&cluster, pi, dataSector, pi->device))
- err(1, "couldn't read sector from disk");
+ {
+ warn("couldn't read sector from disk");
+ break;
+ }
#ifdef _DEBUG
if(g_verifyMode)
@@ -635,7 +638,10 @@ void scroungeUsingRaw(partitioninfo* pi)
sz = read(pi->device, buffSec, kSectorSize);
if(sz == -1 || sz != kSectorSize)
- errx(1, "can't read drive sector");
+ {
+ warn("can't read drive sector");
+ continue;
+ }
/* Check beginning of sector for the magic signature */
if(!memcmp(&magic, &buffSec, sizeof(magic)))