summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-28 15:55:24 +0200
committerwm4 <wm4@nowhere>2014-06-28 15:55:24 +0200
commit88225d0afbe26e0489d2ccef0385823a665b2d24 (patch)
treeca7a21c402c8effa00682be22d26892a2167e89d
parent6eb955e274bbef0cf67a85fdb7f3f4bd4edef59f (diff)
downloadmpv-88225d0afbe26e0489d2ccef0385823a665b2d24.tar.bz2
mpv-88225d0afbe26e0489d2ccef0385823a665b2d24.tar.xz
sub: fix undefined behavior with dvd://
The string could get reallocated. CC: @mpv-player/stable
-rw-r--r--player/sub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/sub.c b/player/sub.c
index 883ffa0dbf..e46438e66e 100644
--- a/player/sub.c
+++ b/player/sub.c
@@ -189,7 +189,7 @@ static void set_dvdsub_fake_extradata(struct dec_sub *dec_sub, struct stream *st
color = (c[2] << 16) | (c[1] << 8) | c[0];
if (i != 0)
- talloc_asprintf_append(s, ", ");
+ s = talloc_asprintf_append(s, ", ");
s = talloc_asprintf_append(s, "%06x", color);
}
s = talloc_asprintf_append(s, "\n");