Browse Source

avformat/3dostr: Check remaining buffer in probe before 8 byte step

Fixes: segfault
Fixes: signal_sigabrt_7ffff6ae7cc9_7213_0d6457b9d6897fa7c78507fa5de53510.ts
Regression since: 3ac45bf665

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.4
Michael Niedermayer 4 years ago
parent
commit
624f6df19f
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavformat/3dostr.c

+ 1
- 2
libavformat/3dostr.c View File

@@ -29,10 +29,9 @@ static int threedostr_probe(const AVProbeData *p)
unsigned chunk = AV_RL32(p->buf + i);
unsigned size = AV_RB32(p->buf + i + 4);

i += 8;
if (size < 8 || p->buf_size - i < size)
return 0;
i += 8;
size -= 8;
switch (chunk) {
case MKTAG('C','T','R','L'):


Loading…
Cancel
Save