diff options
author | wm4 <wm4@nowhere> | 2012-10-20 20:50:40 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-22 01:55:55 +0200 |
commit | 7b65202e4711899680992b723c3c327bc2fd2983 (patch) | |
tree | 13a3ebf8f0dec38d600a0540223482083063800a /sub/osd_libass.c | |
parent | 933805daa16cfbc74610a2221b537c4ddb15d33e (diff) | |
download | mpv-7b65202e4711899680992b723c3c327bc2fd2983.tar.bz2 mpv-7b65202e4711899680992b723c3c327bc2fd2983.tar.xz |
osd_libass: fix stupid dangling pointer crash
append_utf8_buffer() reallocates the buffer passed to it, and returns
the new pointer.
This bug was originally introduced in mplayer2 when that project merged
mpv's osd_libass.c. That merge changed some minor things, including ASS
escape handling. When mpv used this better method of escape handling too
(commit 0ff7dd992fb0), the bug was duplicated.
Diffstat (limited to 'sub/osd_libass.c')
-rw-r--r-- | sub/osd_libass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sub/osd_libass.c b/sub/osd_libass.c index de9f31b2cb..612bef2c56 100644 --- a/sub/osd_libass.c +++ b/sub/osd_libass.c @@ -246,7 +246,7 @@ static char *mangle_ass(const char *in) res = talloc_strndup_append_buffer(res, in, 1); // Break ASS escapes with U+2060 WORD JOINER if (*in == '\\') - append_utf8_buffer(res, 0x2060); + res = append_utf8_buffer(res, 0x2060); in++; } return res; |