avcodec/pgssubdec: Check for duplicate display segments
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 29 Jan 2019 00:06:01 +0000 (01:06 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 3 Feb 2019 23:32:09 +0000 (00:32 +0100)
commit7816497ba081003287557096eea830327281f15d
tree848afa9cc94ad6777be3afdf3eccc95b6575a492
parent953f97979fc292abb3fd166c90bf8fbbf8ef5a73
avcodec/pgssubdec: Check for duplicate display segments

In such a duplication the previous gets overwritten and leaks

Fixes: memleak
Fixes: 12510/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGSSUB_fuzzer-5694439226343424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e35c3d887b3e374c6a091342206a42da48785d70)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/pgssubdec.c