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
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')
-rw-r--r--media-libs/netpbm/files/netpbm-10.86.21-format-security.patch18
-rw-r--r--media-libs/netpbm/netpbm-10.86.21.ebuild1
2 files changed, 19 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;
diff --git a/media-libs/netpbm/netpbm-10.86.21.ebuild b/media-libs/netpbm/netpbm-10.86.21.ebuild
index 4ce9a9ab909a..17dcba9b8e78 100644
--- a/media-libs/netpbm/netpbm-10.86.21.ebuild
+++ b/media-libs/netpbm/netpbm-10.86.21.ebuild
@@ -35,6 +35,7 @@ PATCHES=(
"${FILESDIR}"/netpbm-10.86.21-build.patch
"${FILESDIR}"/netpbm-10.86.21-test.patch #450530
"${FILESDIR}"/netpbm-10.86.21-misc-deps.patch
+ "${FILESDIR}"/netpbm-10.86.21-format-security.patch #517524
)
netpbm_libtype() {