summaryrefslogtreecommitdiffstats
path: root/src/file_tiff_be.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2018-02-18 10:46:53 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2018-02-18 10:46:53 +0100
commitd13e22df20f5111548e1438a6e832b42a2283182 (patch)
treeab3340b124e1aed87d7283f86f76b880b883ca89 /src/file_tiff_be.c
parentfe2059efa9959386b7ad2e1d5a72154800242a97 (diff)
PhotoRec: use memcmp() instead of strcmp() when parsing exe and tiff files
Diffstat (limited to 'src/file_tiff_be.c')
-rw-r--r--src/file_tiff_be.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/file_tiff_be.c b/src/file_tiff_be.c
index 001c895..e0b4390 100644
--- a/src/file_tiff_be.c
+++ b/src/file_tiff_be.c
@@ -499,12 +499,12 @@ int header_check_tiff_be_new(const unsigned char *buffer, const unsigned int buf
tag_make=find_tag_from_tiff_header_be(header, buffer_size, TIFFTAG_MAKE, &potential_error);
if(tag_make!=NULL && tag_make >= (const char *)buffer && tag_make < (const char *)buffer + buffer_size - 20)
{
- if(strcmp(tag_make, "PENTAX Corporation ")==0 ||
- strcmp(tag_make, "PENTAX ")==0)
+ if( memcmp(tag_make, "PENTAX Corporation ", 20)==0 ||
+ memcmp(tag_make, "PENTAX ", 20)==0)
file_recovery_new->extension="pef";
- else if(strcmp(tag_make, "NIKON CORPORATION")==0)
+ else if(memcmp(tag_make, "NIKON CORPORATION", 18)==0)
file_recovery_new->extension="nef";
- else if(strcmp(tag_make, "Kodak")==0)
+ else if(memcmp(tag_make, "Kodak", 6)==0)
file_recovery_new->extension="dcr";
}
}