matroskadec: Fix read-after-free in matroska_read_seek()
authorXiaohan Wang <xhwang@chromium.org>
Thu, 6 Nov 2014 20:59:54 +0000 (12:59 -0800)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Tue, 27 Jan 2015 14:32:56 +0000 (14:32 +0000)
commit532c96a2158c04f265d750d54f2f103b8d9fe0ef
tree8381f7d44073c8983ea8cc3d1f4ed38c290ad81b
parent891de4b27a07b808839b9e873b6a886248c8fd6b
matroskadec: Fix read-after-free in matroska_read_seek()

In matroska_read_seek(), |tracks| is assigned at the begining of the
function. However, functions like matroska_parse_cues() could reallocate
the tracks and invalidate |tracks|.

This assigns |tracks| only before using it, so that it will not get
invalidated elsewhere.

Bug-Id: chromium/427266
libavformat/matroskadec.c