[Devel] serd-0.1.0.c: bad call to snprintf

David Robillard d at drobilla.net
Mon Dec 12 12:35:41 PST 2011


On Sun, 2011-12-11 at 15:15 +0000, David Binderman wrote:
> 
> Hello there,
> 
> I just tried to compile lv2core-4.0 with compiler flag
> -D_FORTIFY_SOURCE=2. 
> 
> The compiler said
> 
> In function 'snprintf',
>     inlined from 'write_text' at ../serd-0.1.0.c:2386:12:
> /usr/include/bits/stdio2.h:65:3: warning: call to
> __builtin___snprintf_chk will always overflow destination buffer
> [enabled by default]
> 
> The source code is
> 
>            snprintf(escape, 11, "\\U%08X", c);
> 
> Suggest new code
> 
>            snprintf(escape, 10, "\\U%08X", c);

This is no longer an issue in lv2core 6.0, and was fixed in serd 0.5.0.

Thanks,

-dr






More information about the Devel mailing list