Reimar Döffinger <[email protected]> added the comment: On Tue, Aug 25, 2009 at 04:49:07PM +0000, Kent Mein wrote: > > New submission from Kent Mein <[email protected]>: > > This is coverity CID: 442 > Checker: OVERRUN_STATIC (help) > File: base/src/extern/ffmpeg/libavcodec/dsputil.c > Function: dsputil_init > Description: Overrun of static array "(c)->put_2tap_qpel_pixels_tab[0]" of > size > 16 at position 63 with index variable "i" > > > 4664 for(i=0; i<64; i++){ > 4665 if(!c->put_2tap_qpel_pixels_tab[0][i]) > 4666 c->put_2tap_qpel_pixels_tab[0][i]= > c->put_h264_qpel_pixels_tab[0][i]; > 4667 if(!c->avg_2tap_qpel_pixels_tab[0][i]) > 4668 c->avg_2tap_qpel_pixels_tab[0][i]= > c->avg_h264_qpel_pixels_tab[0][i]; > 4669 } > > looking at disputil.h you can see that those two arrays are only size > 16. I would change the for loop and remove the elses...
dsputil.h: qpel_mc_func put_2tap_qpel_pixels_tab[4][16]; 4*16 == 64. Thus there is no access outside the array. You can try to propose a patch that uses two loops instead, but in the end this just works around coverity deficiencies. _____________________________________________________ FFmpeg issue tracker <[email protected]> <https://roundup.ffmpeg.org/roundup/ffmpeg/issue1341> _____________________________________________________
