Changeset 456bdd9fa8cd8bd665a1c7f0d9a71a6b87bb7efc

Show
Ignore:
Timestamp:
15/02/08 18:14:19 (10 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1203095659 +0000
git-parent:

[4d12ba40ff9a83fa9994e4d3611c543f0878cb83]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1203095659 +0000
Message:

Fix two more calloc-based denial of service in the MP4 demux.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/mp4/mp4.c

    r6a23b41 r456bdd9  
    486486    /* allocate memory */ 
    487487    p_sys->track = calloc( p_sys->i_tracks, sizeof( mp4_track_t ) ); 
     488    if( p_sys->track == NULL ) 
     489        goto error; 
    488490    memset( p_sys->track, 0, p_sys->i_tracks * sizeof( mp4_track_t ) ); 
    489491 
     
    12331235        p_demux_track->p_sample_size = 
    12341236            calloc( p_demux_track->i_sample_count, sizeof( uint32_t ) ); 
     1237        if( p_demux_track->p_sample_size == NULL ) 
     1238            return VLC_ENOMEM; 
    12351239 
    12361240        for( i_sample = 0; i_sample < p_demux_track->i_sample_count; i_sample++ )