[FFmpeg-cvslog] commit: Check symbol validity to avoid a crash, fixes issue 2523. ( Daniel Kang )

git at videolan.org git
Sat Jan 15 13:06:38 CET 2011


ffmpeg | branch: master | Daniel Kang <daniel.d.kang at gmail.com> | Sat Jan 15 10:18:38 2011 +0000| [eb40d7ffa7d455697849a0a505ca42836b30aa6d] | committer: Carl Eugen Hoyos 

Check symbol validity to avoid a crash, fixes issue 2523.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26360 to svn://svn.ffmpeg.org/ffmpeg/trunk

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eb40d7ffa7d455697849a0a505ca42836b30aa6d
---

 libavcodec/ivi_common.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index b158458..0e552bc 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -404,6 +404,10 @@ int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile)
                         hi  = get_vlc2(gb, band->blk_vlc.tab->table, IVI_VLC_BITS, 1);
                         val = IVI_TOSIGNED((hi << 6) | lo); /* merge them and convert into signed val */
                     } else {
+                        if (sym >= 256U) {
+                            av_log(NULL, AV_LOG_ERROR, "Invalid sym encountered: %d.\n", sym);
+                            return -1;
+                        }
                         run = rvmap->runtab[sym];
                         val = rvmap->valtab[sym];
                     }




More information about the ffmpeg-cvslog mailing list