[FFmpeg-devel] [PATCH] MinGW: Use our snprintf/vsnprintf when MinGW's is broken

Ronald S. Bultje rsbultje at gmail.com
Tue Sep 25 18:16:05 CEST 2012


Hi,

On Tue, Sep 25, 2012 at 7:52 AM, Derek Buitenhuis
<derek.buitenhuis at gmail.com> wrote:
> On 24/09/2012 11:59 PM, jamal wrote:
>> Maybe add "av_printf_format(3, 4);" at the end of the avpriv_snprintf prototype declaration?
>
> This doesn't work so well during configure checks, since it obviously
> can't find libavutil/attributes.h.
>
> Either we can not use it, or we can duplicate the result of the macro
> in snprint.h, which I do not much care for.

Just push it. It fixes the issue. We can look into av_print_format()
or other such subtleties later on. They're mostly cosmetic (they give
cute warnings when using a wrong format string/arguments combination),
whereas your current patch fixes a real bug, possibly exploitable
(depending on the use of snprintf() by the caller).

Ronald


More information about the ffmpeg-devel mailing list