summaryrefslogtreecommitdiffstats
path: root/src/analyse.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-08-12 20:43:38 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-08-12 20:43:38 +0200
commit88372cd6b6176c21d9b870518b3d513f1f2317bd (patch)
tree500987779181b1b003095654ed774e438d4ddd79 /src/analyse.c
parentde04a6886a6fb2dda1eb38c26691091f955a1918 (diff)
TestDisk: add Linux swap using 8k pagefile detection
Diffstat (limited to 'src/analyse.c')
-rw-r--r--src/analyse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/analyse.c b/src/analyse.c
index c901c9b..b39a6a7 100644
--- a/src/analyse.c
+++ b/src/analyse.c
@@ -165,7 +165,8 @@ int search_type_0(const unsigned char *buffer, disk_t *disk, partition_t *partit
log_trace("search_type_0 lba=%lu\n",
(long unsigned)(partition->part_offset/disk->sector_size));
}
- if(memcmp(swap_header->magic.magic, "SWAP", 4)==0 &&
+ if((memcmp(swap_header->magic.magic, "SWAP", 4)==0 ||
+ memcmp(swap_header->magic8k.magic, "SWAP", 4)==0) &&
recover_Linux_SWAP(swap_header, partition)==0)
return 1;
if(memcmp((const char *)pv->id,LVM_ID,sizeof(pv->id)) == 0 &&