OSDN Git Service

Fix read-after-free in matroska_read_seek().
authorXiaohan Wang <xhwang@chromium.org>
Thu, 6 Nov 2014 20:59:54 +0000 (12:59 -0800)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 22 Apr 2015 10:27:23 +0000 (12:27 +0200)
commit0b25a4d253baa8f6b786b04b4417824857e2eb73
tree9b862ae695e6869081fec477674dae892763ee20
parent41dffa883a176d5c9bfea2b144241a160924d524
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 so
that |tracks| can get invalidated.

This CL assigns |tracks| only before we use it so that it won't be invalidated.

BUG=427266
TEST=Test case in associated bug passes now.

Change-Id: I9c7065fe8f4311ca846076281df2282d190ed344

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 33301f001747d7a542073c634cc81da5eff051cf)

Conflicts:

libavformat/matroskadec.c
libavformat/matroskadec.c