vlc | branch: master | Tristan Matthews <[email protected]> | Thu Sep 17 15:12:42 2020 -0400| [a79964b6cb461d9fe8e94a90c9b3aff053be2617] | committer: Tristan Matthews
daala: fix void * dereference issues > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a79964b6cb461d9fe8e94a90c9b3aff053be2617 --- modules/codec/daala.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/codec/daala.c b/modules/codec/daala.c index 8620716923..61c6d53b6e 100644 --- a/modules/codec/daala.c +++ b/modules/codec/daala.c @@ -170,7 +170,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer ) return VLC_ENOMEM; p_dec->p_sys = p_sys; - p_dec->p_sys->b_packetizer = b_packetizer; + p_sys->b_packetizer = b_packetizer; p_sys->b_has_headers = false; p_sys->i_pts = VLC_TICK_INVALID; p_sys->b_decoded_first_keyframe = false; @@ -510,14 +510,15 @@ static void ParseDaalaComments( decoder_t *p_dec ) the bitstream format itself treats them as 8-bit clean vectors, possibly containing null characters, and so the length array should be treated as their authoritative length. */ - for ( int i = 0; i < p_dec->p_sys->dc.comments; i++ ) + decoder_sys_t *p_sys = p_dec->p_sys; + for ( int i = 0; i < p_sys->dc.comments; i++ ) { - int clen = p_dec->p_sys->dc.comment_lengths[i]; + int clen = p_sys->dc.comment_lengths[i]; if ( clen <= 0 || clen >= INT_MAX ) { continue; } psz_comment = malloc( clen + 1 ); if( !psz_comment ) break; - memcpy( (void*)psz_comment, (void*)p_dec->p_sys->dc.user_comments[i], clen + 1 ); + memcpy( (void*)psz_comment, (void*)p_sys->dc.user_comments[i], clen + 1 ); psz_comment[clen] = '\0'; psz_name = psz_comment; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
