[FFmpeg-devel] Get rid of magic number in dsicinvideo.c
u at pkh.me
Mon Nov 23 17:03:44 CET 2015
On Tue, Nov 24, 2015 at 02:34:58AM +1100, Mohammad G wrote:
> File of interest is: libavcodec/dsicinvideo.c
> Line 103:
> memcpy(huff_code_table, src, 15);
> Magic number 15 triggers some source code analysis tools to detect it as a
> potential issue.
> I'm requesting a change to:
> memcpy(huff_code_table, src, sizeof(huff_code_table));
> Which is equivalent in functionality.
Since this won't change a thing unless i'm mistaken, it's strange that the
static analyzer is complaining.
isn't the problem about the fact that it's reading 15 bytes from a source
buffer from which we don't check the length?
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 473 bytes
Desc: not available
More information about the ffmpeg-devel