matroskadec: prevent access of elements after freeing
authorMichael Schenk <michael.schenk@albis-elcon.com>
Fri, 25 Nov 2016 08:36:20 +0000 (09:36 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Wed, 30 Nov 2016 00:15:38 +0000 (01:15 +0100)
commit18b94669372d3d4b6c51e347587ea64acef9dbb8
tree15a9c2d1ef0bfdf6fda051e05a49e8e8879581ca
parent2475858889cde6221677473b663df6f985add33d
matroskadec: prevent access of elements after freeing

Using the decode interrupt feature of ffmpeg may cause crashes by
accessing previously freed pointers in matroska_read_close.

To prevent this reset nb_elem to zero after freeing the elements,
because ffmpeg normally tests for nb_elem.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavformat/matroskadec.c