[MPlayer-cvslog] r37647 - trunk/libmpdemux/demux_mov.c
reimar
subversion at mplayerhq.hu
Tue Feb 9 23:11:53 CET 2016
Author: reimar
Date: Tue Feb 9 23:11:52 2016
New Revision: 37647
Log:
demux_mov: add local variable to deobfuscate code.
Modified:
trunk/libmpdemux/demux_mov.c
Modified: trunk/libmpdemux/demux_mov.c
==============================================================================
--- trunk/libmpdemux/demux_mov.c Tue Feb 9 23:03:11 2016 (r37646)
+++ trunk/libmpdemux/demux_mov.c Tue Feb 9 23:11:52 2016 (r37647)
@@ -745,13 +745,14 @@ static int gen_sh_audio(sh_audio_t* sh,
if((len >= 4) &&
(char2int(trak->stdata,52) >= 12) &&
(char2int(trak->stdata,52+4) == MOV_FOURCC('f','r','m','a'))) {
+ int frma_len = char2int(trak->stdata,52);
switch(char2int(trak->stdata,52+8)) {
case MOV_FOURCC('a','l','a','c'):
- if (len >= 36 + char2int(trak->stdata,52)) {
- sh->codecdata_len = char2int(trak->stdata,52+char2int(trak->stdata,52));
+ if (len >= 36 + frma_len) {
+ sh->codecdata_len = char2int(trak->stdata,52+frma_len);
mp_msg(MSGT_DEMUX, MSGL_V, "MOV: Found alac atom (%d)!\n", sh->codecdata_len);
sh->codecdata = malloc(sh->codecdata_len);
- memcpy(sh->codecdata, &trak->stdata[52+char2int(trak->stdata,52)], sh->codecdata_len);
+ memcpy(sh->codecdata, &trak->stdata[52+frma_len], sh->codecdata_len);
}
break;
case MOV_FOURCC('i','n','2','4'):
More information about the MPlayer-cvslog
mailing list