mirror of https://github.com/mpv-player/mpv
Bugfix: sub_recode could deallocate global sub_cp under some circumstances.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20618 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
1547c31174
commit
452d1d6c61
|
@ -805,7 +805,7 @@ static char* sub_recode(char* data, size_t size, char* codepage)
|
|||
assert(codepage);
|
||||
|
||||
{
|
||||
char* cp_tmp = codepage;
|
||||
char* cp_tmp = codepage ? strdup(codepage) : 0;
|
||||
#ifdef HAVE_ENCA
|
||||
char enca_lang[3], enca_fallback[100];
|
||||
if (sscanf(codepage, "enca:%2s:%99s", enca_lang, enca_fallback) == 2
|
||||
|
|
Loading…
Reference in New Issue