summaryrefslogtreecommitdiffstats
path: root/src/file_mpg.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2010-03-16 22:14:50 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2010-03-16 22:14:50 +0100
commitf75342338549db225fec9b062199b09796a8c3ec (patch)
tree1fe7ca319fb05ae28bb5b02952920afbfd7a4965 /src/file_mpg.c
parent0dc8d4f0ae57b35b07b39f4aa63183550eae551b (diff)
PhotoRec: stricter check for MPG file beginning by MPEG-4 visual object start code
Diffstat (limited to 'src/file_mpg.c')
-rw-r--r--src/file_mpg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file_mpg.c b/src/file_mpg.c
index 6b2ae7f..80012fe 100644
--- a/src/file_mpg.c
+++ b/src/file_mpg.c
@@ -110,7 +110,7 @@ static int header_check_mpg(const unsigned char *buffer, const unsigned int buff
/* ISO/IEC 14496-2 (MPEG-4 video) ELEMENTARY VIDEO HEADER - visual object sequence start code */
(buffer[3]==0xB0) ||
/* ISO/IEC 14496-2 (MPEG-4 video) ELEMENTARY VIDEO HEADER - visual object start code */
- (buffer[3]==0xB5)
+ (buffer[3]==0xB5 && (buffer[4]&0xf0)==0x80)
)
)
{