diff options
author | Roberto Togni <r_togni@tiscali.it> | 2005-01-09 23:39:32 +0000 |
---|---|---|
committer | Roberto Togni <r_togni@tiscali.it> | 2005-01-09 23:39:32 +0000 |
commit | c31b81216619e6b3d986ce63c82357993e10e8e9 (patch) | |
tree | 7284ec8818011bff0cff35c5208f5edff050f0bb /libavcodec/utils.c | |
parent | 9c6221ae621a3467b7466e98975e63b2382c1b58 (diff) | |
download | ffmpeg-c31b81216619e6b3d986ce63c82357993e10e8e9.tar.gz |
Check pointers before writing to memory, fix possible integer overflows
Force alignement for mszh and zlib decoders
Originally committed as revision 3817 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index f11d22e590..aa042c795a 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -217,6 +217,12 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){ h_align=4; } break; + case PIX_FMT_BGR24: + if((s->codec_id == CODEC_ID_MSZH) || (s->codec_id == CODEC_ID_ZLIB)){ + w_align=4; + h_align=4; + } + break; default: w_align= 1; h_align= 1; |