summaryrefslogtreecommitdiffstats
path: root/src/file_jpg.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-02-02 15:22:10 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2014-02-02 15:22:10 +0100
commit4510835e94d07809f1be52fe31a87a3bd02efc50 (patch)
tree7e8ad1706a8fa73b8ac5544ea4774e869e71b64b /src/file_jpg.c
parent5b0b6e820b782bd0a666dbd550b2d43c5b958ae4 (diff)
src/file_jpg.c: remove logically dead code
Diffstat (limited to 'src/file_jpg.c')
-rw-r--r--src/file_jpg.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/file_jpg.c b/src/file_jpg.c
index 49af560..2b37ebf 100644
--- a/src/file_jpg.c
+++ b/src/file_jpg.c
@@ -1586,15 +1586,6 @@ static data_check_t data_check_jpg2(const unsigned char *buffer, const unsigned
file_recovery->data_check=&data_check_jpg;
return data_check_jpg(buffer, buffer_size, file_recovery);
}
- if(buffer[buffer_size/2]==0xff && buffer[buffer_size/2]==0xd8 &&
- file_recovery->calculated_file_size != file_recovery->file_size)
- {
-#ifdef DEBUG_JPEG
- log_info("%s data_check_jpg2 0xffd8 at 0x%llx\n", file_recovery->filename,
- (long long unsigned)file_recovery->calculated_file_size);
-#endif
- return DC_STOP;
- }
while(file_recovery->calculated_file_size + buffer_size/2 > file_recovery->file_size &&
file_recovery->calculated_file_size < file_recovery->file_size + buffer_size/2)
{
@@ -1641,12 +1632,6 @@ static data_check_t data_check_jpg2(const unsigned char *buffer, const unsigned
data_check_t data_check_jpg(const unsigned char *buffer, const unsigned int buffer_size, file_recovery_t *file_recovery)
{
- if(buffer[buffer_size/2]==0xff && buffer[buffer_size/2]==0xd8 &&
- file_recovery->calculated_file_size != file_recovery->file_size)
- {
- log_info("data_check_jpg ffd8\n");
- return DC_STOP;
- }
/* Skip the SOI */
if(file_recovery->calculated_file_size==0)
file_recovery->calculated_file_size+=2;