avcodec/dvdsub: fix partial packet assembly
authorwm4 <nfxjfg@googlemail.com>
Mon, 21 Sep 2015 16:16:35 +0000 (18:16 +0200)
committerwm4 <nfxjfg@googlemail.com>
Tue, 22 Sep 2015 15:41:01 +0000 (17:41 +0200)
commitf874e2728b0925b2ec30dd7ec64815f15078c06f
treedaa8a5f789d6d77f0f7c2b30c08dbd43e29d6a3d
parent26eb2940079d0ec433cf9b2deae24560707cbcf8
avcodec/dvdsub: fix partial packet assembly

Assuming the first and second packets are partial, this would append the
reassembly buffer (ctx->buf) to itself with the second
append_to_cached_buf() call, because buf is set to ctx->buf.

I do not know a valid sample file which triggers this, and do not know
if packets can be split into more than 2 sub-packets, but it triggered
with a (differently) broken sample file in trac issue #4872.
libavcodec/dvdsubdec.c