diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-22 17:31:56 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-22 17:35:20 +0200 |
commit | 49d597f058a9f3a09d272e711d636f5e6829920e (patch) | |
tree | 0cd8a9554564f8a23afa954782d34a1447b4904b /libavcodec/dsputil.c | |
parent | 44ebb2556d099c8103247b7c2b60eab399f300af (diff) | |
parent | 9c713f30e4913a28d93eb37ea5db7f62be4c0ef6 (diff) | |
download | ffmpeg-49d597f058a9f3a09d272e711d636f5e6829920e.tar.gz |
Merge commit '9c713f30e4913a28d93eb37ea5db7f62be4c0ef6' into release/0.8
* commit '9c713f30e4913a28d93eb37ea5db7f62be4c0ef6':
parser: fix large overreads
dsputil: fix invalid array indexing
shorten: use the unsigned type where needed
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 0e596b1b01..89b0d5871e 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2836,7 +2836,7 @@ int ff_check_alignment(void){ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) { - int i; + int i, j; ff_check_alignment(); @@ -3222,11 +3222,15 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) if (ARCH_SH4) dsputil_init_sh4 (c, avctx); if (ARCH_BFIN) dsputil_init_bfin (c, avctx); - for(i=0; i<64; i++){ - if(!c->put_2tap_qpel_pixels_tab[0][i]) - c->put_2tap_qpel_pixels_tab[0][i]= c->put_h264_qpel_pixels_tab[0][i]; - if(!c->avg_2tap_qpel_pixels_tab[0][i]) - c->avg_2tap_qpel_pixels_tab[0][i]= c->avg_h264_qpel_pixels_tab[0][i]; + for (i = 0; i < 4; i++) { + for (j = 0; j < 16; j++) { + if(!c->put_2tap_qpel_pixels_tab[i][j]) + c->put_2tap_qpel_pixels_tab[i][j] = + c->put_h264_qpel_pixels_tab[i][j]; + if(!c->avg_2tap_qpel_pixels_tab[i][j]) + c->avg_2tap_qpel_pixels_tab[i][j] = + c->avg_h264_qpel_pixels_tab[i][j]; + } } c->put_rv30_tpel_pixels_tab[0][0] = c->put_h264_qpel_pixels_tab[0][0]; |