[FFmpeg-devel] Get rid of magic number in dsicinvideo.c

Ganesh Ajjanagadde gajjanag at mit.edu
Mon Nov 23 16:44:47 CET 2015


On Mon, Nov 23, 2015 at 10:34 AM, Mohammad G <webmaster at mohammadg.com> wrote:
> Greetings,
>
> 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.

I like the proposed change. Care to send an actual patch to the
mailing list? Thanks.

>
> Regards,
> Mohammad
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list