summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/file_exe.c2
-rw-r--r--src/file_tiff_be.c8
-rw-r--r--src/file_tiff_le.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/file_exe.c b/src/file_exe.c
index 819cc69..e8f0332 100644
--- a/src/file_exe.c
+++ b/src/file_exe.c
@@ -503,7 +503,7 @@ static void file_rename_pe_exe(file_recovery_t *file_recovery)
{
if(le32(pe_section->SizeOfRawData)>0)
{
- if(strcmp((const char*)pe_section->Name, ".rsrc")==0)
+ if(memcmp((const char*)pe_section->Name, ".rsrc", 6)==0)
{
file_exe_ressource(file,
le32(pe_section->PointerToRawData),
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";
}
}
diff --git a/src/file_tiff_le.c b/src/file_tiff_le.c
index b0dfda3..9ae9d60 100644
--- a/src/file_tiff_le.c
+++ b/src/file_tiff_le.c
@@ -522,7 +522,7 @@ int header_check_tiff_le_new(const unsigned char *buffer, const unsigned int buf
/* TODO
* sr2 if Sony::FileFormat begins by 1
* arw otherwise */
- if(strcmp(tag_make, "SONY")==0)
+ if(memcmp(tag_make, "SONY", 5)==0)
file_recovery_new->extension="sr2";
else if(strncmp(tag_make, "SONY ",5)==0)
file_recovery_new->extension="arw";