summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-28 15:55:24 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2014-07-05 00:24:59 +0200
commit0075f8e0cfbeabf927d326f611a1af07595dbafc (patch)
treec0b1aa7a7c2e731f5e25b7f955f2b7e32c0537cf /player
parent49275b2879b085ff1d0703c47a8cf0a0268fc81f (diff)
downloadmpv-0075f8e0cfbeabf927d326f611a1af07595dbafc.tar.bz2
mpv-0075f8e0cfbeabf927d326f611a1af07595dbafc.tar.xz
sub: fix undefined behavior with dvd://
The string could get reallocated. CC: @mpv-player/stable
Diffstat (limited to 'player')
-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");