You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-libs/netpbm/files/netpbm-10.86.21-format-secu...

19 lines
730 B

Fix compiling with `CFLAGS` `-Werror=format-security`
See also https://bugs.gentoo.org/517524
--- a/converter/ppm/ximtoppm.c
+++ b/converter/ppm/ximtoppm.c
@@ -117,9 +117,9 @@
*/
header->bits_channel = atoi(a_head.bits_per_channel);
header->alpha_flag = atoi(a_head.alpha_channel);
- pm_asprintf(&header->author, a_head.author);
- pm_asprintf(&header->date, a_head.date);
- pm_asprintf(&header->program, a_head.program);
+ pm_asprintf(&header->author, "%s", a_head.author);
+ pm_asprintf(&header->date, "%s", a_head.date);
+ pm_asprintf(&header->program, "%s", a_head.program);
/* Do double checking for bakwards compatibility */
if (header->npics == 0)
header->npics = 1;