summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViorel Munteanu <ceamac.paragon@gmail.com>2021-04-17 14:49:06 +0300
committerJoonas Niilola <juippis@gentoo.org>2021-05-10 09:23:06 +0300
commita77aca5fe3136bdd774e403d093ee5cc9125df33 (patch)
tree64c8f6dd3d6ff1ec2903de380fbc7fd7189fc545 /media-libs/netpbm/files
parentmedia-libs/netpbm: new version 10.86.21 (diff)
downloadgentoo-a77aca5fe3136bdd774e403d093ee5cc9125df33.tar.gz
gentoo-a77aca5fe3136bdd774e403d093ee5cc9125df33.tar.bz2
gentoo-a77aca5fe3136bdd774e403d093ee5cc9125df33.zip
media-libs/netpbm: fix compiling with format-security
Closes: https://bugs.gentoo.org/517524 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-libs/netpbm/files')
-rw-r--r--media-libs/netpbm/files/netpbm-10.86.21-format-security.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch b/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch
new file mode 100644
index 000000000000..a7afc259ff5c
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.86.21-format-security.patch
@@ -0,0 +1,18 @@
+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;