summaryrefslogtreecommitdiff
path: root/libavformat/jvdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/jvdec.c')
-rw-r--r--libavformat/jvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c
index 4d4f0c78c5..a31c7236ff 100644
--- a/libavformat/jvdec.c
+++ b/libavformat/jvdec.c
@@ -54,7 +54,7 @@ typedef struct JVDemuxContext {
static int read_probe(AVProbeData *pd)
{
- if (pd->buf[0] == 'J' && pd->buf[1] == 'V' && strlen(MAGIC) <= pd->buf_size - 4 &&
+ if (pd->buf[0] == 'J' && pd->buf[1] == 'V' && strlen(MAGIC) + 4 <= pd->buf_size &&
!memcmp(pd->buf + 4, MAGIC, strlen(MAGIC)))
return AVPROBE_SCORE_MAX;
return 0;