aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/diffutils/diffutils-2.8.1/0001-Make-it-build-with-compile-time-hardening-enabled.patch
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2018-04-26 02:45:07 +0200
committerPeter Kjellerstedt <pkj@axis.com>2018-04-26 03:01:36 +0200
commitd7687d404bbc9ba3f44ec43ea8828d9071033513 (patch)
tree43e28b1357b93170acb64d23ea207204b425376d /recipes-extended/diffutils/diffutils-2.8.1/0001-Make-it-build-with-compile-time-hardening-enabled.patch
parentf7a0bb4e7916989bffc697c964aaf932e37095bd (diff)
downloadmeta-gplv2-135f9cf6403af4d14c8a6273050466b31ed9f85c.tar.gz
meta-gplv2-135f9cf6403af4d14c8a6273050466b31ed9f85c.tar.bz2
meta-gplv2-135f9cf6403af4d14c8a6273050466b31ed9f85c.zip
diffutils Make it build with compile time hardening enabledyocto-2.5.3yocto-2.5.2sumo-19.0.3sumo-19.0.2
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Diffstat (limited to 'recipes-extended/diffutils/diffutils-2.8.1/0001-Make-it-build-with-compile-time-hardening-enabled.patch')
-rw-r--r--recipes-extended/diffutils/diffutils-2.8.1/0001-Make-it-build-with-compile-time-hardening-enabled.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/recipes-extended/diffutils/diffutils-2.8.1/0001-Make-it-build-with-compile-time-hardening-enabled.patch b/recipes-extended/diffutils/diffutils-2.8.1/0001-Make-it-build-with-compile-time-hardening-enabled.patch
new file mode 100644
index 0000000..dc03aa6
--- /dev/null
+++ b/recipes-extended/diffutils/diffutils-2.8.1/0001-Make-it-build-with-compile-time-hardening-enabled.patch
@@ -0,0 +1,32 @@
+From 7448c928240aafbfec08a92530a150bc206673bf Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Thu, 26 Apr 2018 02:40:52 +0200
+Subject: [PATCH] Make it build with compile time hardening enabled
+
+This avoids the following error:
+
+ src/diff3.c: In function 'output_diff3':
+ src/diff3.c:1405:5: error: format not a string literal and no format
+ arguments [-Werror=format-security]
+ fprintf (outputfile, line_prefix);
+ ^~~~~~~
+
+Upstream-Status: Inappropriate [legacy version]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ src/diff3.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/diff3.c b/src/diff3.c
+index f3d3dcf..7237dea 100644
+--- a/src/diff3.c
++++ b/src/diff3.c
+@@ -1402,7 +1402,7 @@ output_diff3 (FILE *outputfile, struct diff3_block *diff,
+ line = 0;
+ do
+ {
+- fprintf (outputfile, line_prefix);
++ fprintf (outputfile, "%s", line_prefix);
+ cp = D_RELNUM (ptr, realfile, line);
+ length = D_RELLEN (ptr, realfile, line);
+ fwrite (cp, sizeof (char), length, outputfile);