summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-10-21 12:14:14 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-10-21 12:14:14 +0200
commitea7966cef9f1d72860ee68e01b9f3ebf7fa33dc9 (patch)
tree23f85731f3da5839c05b736d4f366c7baf90f48a /src
parentdf875ab304e0b09f1a451886bf8e3e098da53bab (diff)
Minor code cleanup
Diffstat (limited to 'src')
-rw-r--r--src/exfat_dir.c2
-rw-r--r--src/file_dir.c4
-rw-r--r--src/file_doc.c2
-rw-r--r--src/file_ext.c4
-rw-r--r--src/file_mft.c2
-rw-r--r--src/file_mov.c2
6 files changed, 7 insertions, 9 deletions
diff --git a/src/exfat_dir.c b/src/exfat_dir.c
index 2a80cda..bf91e58 100644
--- a/src/exfat_dir.c
+++ b/src/exfat_dir.c
@@ -66,8 +66,6 @@ static inline void exfat16_towchar(wchar_t *dst, const uint8_t *src, size_t len)
static int exfat_copy(disk_t *disk, const partition_t *partition, dir_data_t *dir_data, const file_data_t *file);
static void dir_partition_exfat_close(dir_data_t *dir_data);
-static int32_t secwest;
-
static inline void exfat16_towchar(wchar_t *dst, const uint8_t *src, size_t len)
{
while (len--) {
diff --git a/src/file_dir.c b/src/file_dir.c
index a261bac..fcd7c2f 100644
--- a/src/file_dir.c
+++ b/src/file_dir.c
@@ -50,12 +50,10 @@ const file_hint_t file_hint_dir= {
.register_header_check=&register_header_check_dir
};
-static const unsigned char *dir_header=(const unsigned char *)". ";
-
static void file_rename_fatdir(const char *old_filename)
{
unsigned char buffer[512];
- unsigned char buffer_cluster[32];
+ char buffer_cluster[32];
FILE *file;
int buffer_size;
unsigned int cluster;
diff --git a/src/file_doc.c b/src/file_doc.c
index ed7b847..54c420b 100644
--- a/src/file_doc.c
+++ b/src/file_doc.c
@@ -350,7 +350,7 @@ static int header_check_doc(const unsigned char *buffer, const unsigned int buff
else if(td_memmem(buffer,buffer_size,"StarCalc",8)!=NULL)
file_recovery_new->extension="sdc";
}
- if(strcmp(file_recovery_new->extension,"wps")==0)
+ else if(strcmp(file_recovery_new->extension,"wps")==0)
{
/* Distinguish between MS Works .wps and MS Publisher .pub */
if(td_memmem(buffer,buffer_size,"Microsoft Publisher",19)!=NULL)
diff --git a/src/file_ext.c b/src/file_ext.c
index d7ad79a..caa149b 100644
--- a/src/file_ext.c
+++ b/src/file_ext.c
@@ -47,7 +47,7 @@ const file_hint_t file_hint_ext2_sb= {
static void file_rename_ext(const char *old_filename)
{
unsigned char buffer[512];
- unsigned char buffer_cluster[32];
+ char buffer_cluster[32];
FILE *file;
const struct ext2_super_block *sb=(const struct ext2_super_block *)&buffer;
int buffer_size;
@@ -101,7 +101,7 @@ static int header_check_ext2_sb(const unsigned char *buffer, const unsigned int
static void file_rename_extdir(const char *old_filename)
{
unsigned char buffer[512];
- unsigned char buffer_cluster[32];
+ char buffer_cluster[32];
FILE *file;
int buffer_size;
const uint32_t *inode=(const uint32_t *)&buffer[0];
diff --git a/src/file_mft.c b/src/file_mft.c
index ae88759..9b28c21 100644
--- a/src/file_mft.c
+++ b/src/file_mft.c
@@ -48,7 +48,7 @@ const file_hint_t file_hint_mft= {
static void file_rename_mft(const char *old_filename)
{
unsigned char buffer[512];
- unsigned char buffer_cluster[32];
+ char buffer_cluster[32];
FILE *file;
int buffer_size;
const struct ntfs_mft_record *record=(const struct ntfs_mft_record *)&buffer;
diff --git a/src/file_mov.c b/src/file_mov.c
index 715719a..993ce95 100644
--- a/src/file_mov.c
+++ b/src/file_mov.c
@@ -192,6 +192,7 @@ static int header_check_mov(const unsigned char *buffer, const unsigned int buff
}
else if(td_memmem(&buffer[i+8], search_size-8, "3gp", 3)!=NULL)
{
+ /* Video for 3G mobile phone (GSM) */
reset_file_recovery(file_recovery_new);
file_recovery_new->extension="3gp";
file_recovery_new->data_check=data_check_mov;
@@ -201,6 +202,7 @@ static int header_check_mov(const unsigned char *buffer, const unsigned int buff
}
else if(td_memmem(&buffer[i+8], search_size-8, "3g2", 3)!=NULL)
{
+ /* Video for 3G mobile phone (CDMA) */
reset_file_recovery(file_recovery_new);
file_recovery_new->extension="3g2";
file_recovery_new->data_check=data_check_mov;