summaryrefslogtreecommitdiffstats
path: root/src/file_riff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_riff.c')
-rw-r--r--src/file_riff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file_riff.c b/src/file_riff.c
index f6cc5ca..dedc297 100644
--- a/src/file_riff.c
+++ b/src/file_riff.c
@@ -259,7 +259,7 @@ static int header_check_riff(const unsigned char *buffer, const unsigned int buf
reset_file_recovery(file_recovery_new);
file_recovery_new->extension="avi";
/* Is it a raw avi stream with Data Binary chunks ? */
- if(size + 4 < buffer_size &&
+ if(size < buffer_size - 4 &&
memcmp(&buffer[size - sizeof(list_movi)], &list_movi, sizeof(list_movi)) ==0 &&
buffer[size+2]=='d' &&
buffer[size+3]=='b')