From 88225d0afbe26e0489d2ccef0385823a665b2d24 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 28 Jun 2014 15:55:24 +0200 Subject: sub: fix undefined behavior with dvd:// The string could get reallocated. CC: @mpv-player/stable --- player/sub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') 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"); -- cgit v1.2.3