vlc | branch: master | Jean-Baptiste Kempf <[email protected]> | Sat Jun 4 17:20:51 2011 +0200| [932aae731f036119f9cc469b7d7672dad354fae3] | committer: Jean-Baptiste Kempf
AVI: fix a crash in palette handling This happen when p_vids->p_bih->biSize - sizeof( BITMAPINFOHEADER ) = 0 and the data is in p_vids->i_chunk_size, because then p_extra == NULL. This solves the fruity sample crash but doesn't fix the palette > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=932aae731f036119f9cc469b7d7672dad354fae3 --- modules/demux/avi/avi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c index 4a1d491..66b8428 100644 --- a/modules/demux/avi/avi.c +++ b/modules/demux/avi/avi.c @@ -557,7 +557,7 @@ static int Open( vlc_object_t * p_this ) { /* The palette is not always included in biSize */ fmt.i_extra = p_vids->i_chunk_size - sizeof(BITMAPINFOHEADER); - if( fmt.i_extra > 0 ) + if( fmt.i_extra > 0 && fmt.p_extra ) { const uint8_t *p_pal = fmt.p_extra; _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
