summaryrefslogtreecommitdiffstats
path: root/src/file_exe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_exe.c')
-rw-r--r--src/file_exe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file_exe.c b/src/file_exe.c
index e8f0332..1348db5 100644
--- a/src/file_exe.c
+++ b/src/file_exe.c
@@ -178,7 +178,7 @@ static int header_check_exe(const unsigned char *buffer, const unsigned int buff
if(le16(dos_hdr->bytes_in_last_block))
coff_offset-=512-le16(dos_hdr->bytes_in_last_block);
- if(coff_offset+1 < buffer_size &&
+ if(coff_offset < buffer_size-1 &&
buffer[coff_offset]==0x4c && buffer[coff_offset+1]==0x01)
{ /* COFF_I386MAGIC */
reset_file_recovery(file_recovery_new);