diff options
Diffstat (limited to 'app-text/fbpdf')
-rw-r--r-- | app-text/fbpdf/Manifest | 3 | ||||
-rw-r--r-- | app-text/fbpdf/fbpdf-0_p20190202.ebuild | 5 | ||||
-rw-r--r-- | app-text/fbpdf/files/fbpdf-0_p20190202-printf.patch | 38 |
3 files changed, 43 insertions, 3 deletions
diff --git a/app-text/fbpdf/Manifest b/app-text/fbpdf/Manifest index 26ba331448e5..af04056a1dda 100644 --- a/app-text/fbpdf/Manifest +++ b/app-text/fbpdf/Manifest @@ -1,4 +1,5 @@ +AUX fbpdf-0_p20190202-printf.patch 1166 BLAKE2B 41972cfeea7bbc8d1e1840a21882c82050b2f91fff75056067fd00e6ed4a67929f35674cb3e09e5345ce2690cbb92a1676a4ef273f804d866cad5385cc48cc43 SHA512 e91f8158d0a8237010dda66eee289046348b8b657b859e4de1ae22c91424c47775df94f5d58151c930453389e71b4237c07b942c4391afe288e980d19833f183 AUX fbpdf-0_p20190202-use-pkg-config.patch 1258 BLAKE2B 7542773b6ecf8fed73abcca526d41cfbc7629da44bd3e50649951680469ac7a5f1392a75b4849a8626fe740436bf1bdea9a0131f9e60558f37bb7cdbb1ed89e7 SHA512 6086ff1948ba000c8330aa5fe510b84d74a91254a75ac07c326730c371a4ab47cd2f936ceb888bed4c1520b9fec61a823fb1656533374586cd4fe2466b3160bc DIST fbpdf-0_p20190202-dfe9f0067549f759cdc04f2f62b4f89cd6e1b199.tar.gz 7874 BLAKE2B 873da768b0152559536c73b7ed575c3457efe184934a38d0a9600412ac3a8616297194ab045be1d7eddb470d8d73ead4c655797fd7ba1efe6f2be9a19a5318b4 SHA512 f216a0993573e4e491845638b72ff019910f8a333ed618158e81bcb3f68619596f0354b0039c38c7619dd65c040aa599ed8923ac974717b86fb431e5c6954f3b -EBUILD fbpdf-0_p20190202.ebuild 889 BLAKE2B 2e892ae435016b53f1b24c36c2787ab5fed99976d78c4d9a702c9f0483e284d397385461707bc9961bf3adacc7d18ee8ead7dec892f681a3b7bd562d98ea2739 SHA512 46b45f82db26eee5d726b78810aa403873e6e3ef4bd63ae34d5c15754a5667b4f4e689fdfa3d86200b0dd75b3d0d52b35d53327065391767b28fe4e4e3afc3f4 +EBUILD fbpdf-0_p20190202.ebuild 925 BLAKE2B 7f2caa4ae663a18690013460940ccd040b40cd00c92be732b948f322e98f9ecf2c4309b72dab401f8ea201661a55a350ffa54dd3026eee87a87b0c22d6e720c3 SHA512 841085eede01cb591d166e2359f69b7504b3fe8eaed10d722711f792db0359b00cd7ff3505bcbff53acffe68f1de329e4b768bfcc1629c38b41d4ddcf26e855c MISC metadata.xml 251 BLAKE2B 9785c4729d0751280d104965bab25a268219a7fee217dcd8c01a5642a13f8abc471a3dff54ae0d34d3cf3dc8267fb483d93bd3b16aa3617e8fa8e9abd1703dfe SHA512 cc2bd3977894946ee4ea5b739cc3998bcd6017b9e7a52aa501409d0988954339a9a22fe751d0a5e967ddac9225d9b23f20b4fb1e2c62ee91d1d23c383d9776dd diff --git a/app-text/fbpdf/fbpdf-0_p20190202.ebuild b/app-text/fbpdf/fbpdf-0_p20190202.ebuild index 029af2a8ece1..2cae3b100718 100644 --- a/app-text/fbpdf/fbpdf-0_p20190202.ebuild +++ b/app-text/fbpdf/fbpdf-0_p20190202.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -21,7 +21,7 @@ RDEPEND=" app-text/djvu:0= dev-lang/mujs:0= dev-libs/openssl:0= - !media-gfx/fbida[fbcon] + !media-gfx/fbida[fbcon(-)] media-libs/freetype:2= media-libs/jbig2dec:0= media-libs/openjpeg:0= @@ -34,6 +34,7 @@ S=${WORKDIR}/${P}-${COMMIT} PATCHES=( "${FILESDIR}"/${P}-use-pkg-config.patch + "${FILESDIR}"/${P}-printf.patch ) src_compile() { diff --git a/app-text/fbpdf/files/fbpdf-0_p20190202-printf.patch b/app-text/fbpdf/files/fbpdf-0_p20190202-printf.patch new file mode 100644 index 000000000000..31f9fbe2c8ab --- /dev/null +++ b/app-text/fbpdf/files/fbpdf-0_p20190202-printf.patch @@ -0,0 +1,38 @@ +https://bugs.gentoo.org/714736 + +From e89e36c01d09ca6aec03732e922e749257cac3f4 Mon Sep 17 00:00:00 2001 +From: Dmitry Bogatov <KAction@disroot.org> +Date: Sun, 9 Feb 2020 00:47:09 -0500 +Subject: [PATCH] Avoid passing non-constant format string to printf + +gcc complains loudly on any code that uses anything but string literal +as format string to printf. Right now format string is "const char *" +and does not contain %-sequences, but should '%' appear in "usage" +string in future, bad things would happen. + +Since formatting functionality of "printf" is not used anyway, replacing +it with "puts" makes code both safer and easier to understand. +--- + fbpdf.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fbpdf.c b/fbpdf.c +index a58797f..65b654b 100644 +--- a/fbpdf.c ++++ b/fbpdf.c +@@ -351,13 +351,13 @@ static void mainloop(void) + } + + static char *usage = +- "usage: fbpdf [-r rotation] [-z zoom x10] [-p page] filename\n"; ++ "usage: fbpdf [-r rotation] [-z zoom x10] [-p page] filename"; + + int main(int argc, char *argv[]) + { + int i = 1; + if (argc < 2) { +- printf(usage); ++ puts(usage); + return 1; + } + strcpy(filename, argv[argc - 1]); |