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, 24 Mar 2019 09:38:51 +0000 (10:38 +0100)
commit4946bda47302276e09000c0cd011e8327230d440
treed9f3440e82fb600597e772c55c0175b36bee4818
parent136ec39a2f810f8bbdb29d80aeb3ee430e6eecd8
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