Changeset ab4e8a39d0b2d9c2998d7ab248b83463fd67f2a1

Show
Ignore:
Timestamp:
03/31/08 09:36:00 (5 months ago)
Author:
Jean-Paul Saman <jpsaman@videolan.org>
git-committer:
Jean-Paul Saman <jpsaman@videolan.org> 1206948960 +0200
git-parent:

[9e856ef47f531cd138ad685c697d4dc7a7467975]

git-author:
Rafaël Carré <funman@videolan.org> 1206719476 +0100
Message:

H264 packetizer : NEVER TRUST INPUT !!

Do not allocate ridiculous amount of datas.

Signed-off-by: Jean-Paul Saman <jpsaman@videolan.org>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/packetizer/h264.c

    r079a181 rab4e8a3  
    448448        } 
    449449 
    450         if( i_size > 0
     450        if( i_size > 0 && i_size < p_block->i_buffer
    451451        { 
    452452            block_t *p_part = nal_get_annexeb( p_dec, p, i_size ); 
    453  
     453            if( !p_part ) 
     454            { 
     455                block_Release( p_block ); 
     456                return NULL; 
     457            } 
    454458            p_part->i_dts = p_block->i_dts; 
    455459            p_part->i_pts = p_block->i_pts; 
     
    473477 
    474478    p_nal = block_New( p_dec, 4 + i_size ); 
     479    if( !p_nal ) return NULL; 
    475480 
    476481    /* Add start code */