[gtkada] Patch: Fix unsafe use of g_snprintf.

Björn Persson bjorn at xn--rombobjrn-67a.se
Fri Dec 6 15:56:07 CET 2013


Fedora is preparing to turn on a GCC option that makes unsafe use of
printf-like functions a compile-time error. Four cases were found in the
GTKada source. I don't know if it can be proven impossible for percent
characters to occur in the strings in these four cases, but copying
strings with a function made for copying strings makes the code more
robust.

Changelog message:
* gtkplotflux.c (gtk_plot_flux_get_legend_size,
gtk_plot_flux_draw_legend): Copy strings with g_strlcpy instead of
passing them as format strings to g_snprintf.

Björn Persson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stringcopy.patch
Type: text/x-patch
Size: 1217 bytes
Desc: not available
URL: </pipermail/gtkada/attachments/20131206/bb869311/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: </pipermail/gtkada/attachments/20131206/bb869311/attachment.pgp>


More information about the gtkada mailing list