summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-12-16 17:11:34 -0800
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-01-08 18:21:44 -0500
commit1a4b7ee28bf7413af6513fb45ad0d0736048f866 (patch)
tree79f6d8ea698cab8f2eaf4f54b793d2ca7a1451ce /meta-openembedded/meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch
parent5b9ede0403237c7dace972affa65cf64a1aadd0e (diff)
downloadtalos-openbmc-1a4b7ee28bf7413af6513fb45ad0d0736048f866.tar.gz
talos-openbmc-1a4b7ee28bf7413af6513fb45ad0d0736048f866.zip
reset upstream subtrees to yocto 2.6
Reset the following subtrees on thud HEAD: poky: 87e3a9739d meta-openembedded: 6094ae18c8 meta-security: 31dc4e7532 meta-raspberrypi: a48743dc36 meta-xilinx: c42016e2e6 Also re-apply backports that didn't make it into thud: poky: 17726d0 systemd-systemctl-native: handle Install wildcards meta-openembedded: 4321a5d libtinyxml2: update to 7.0.1 042f0a3 libcereal: Add native and nativesdk classes e23284f libcereal: Allow empty package 030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG 179a1b9 gtest: update to 1.8.1 Squashed OpenBMC subtree compatibility updates: meta-aspeed: Brad Bishop (1): aspeed: add yocto 2.6 compatibility meta-ibm: Brad Bishop (1): ibm: prepare for yocto 2.6 meta-ingrasys: Brad Bishop (1): ingrasys: set layer compatibility to yocto 2.6 meta-openpower: Brad Bishop (1): openpower: set layer compatibility to yocto 2.6 meta-phosphor: Brad Bishop (3): phosphor: set layer compatibility to thud phosphor: libgpg-error: drop patches phosphor: react to fitimage artifact rename Ed Tanous (4): Dropbear: upgrade options for latest upgrade yocto2.6: update openssl options busybox: remove upstream watchdog patch systemd: Rebase CONFIG_CGROUP_BPF patch Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch')
-rw-r--r--meta-openembedded/meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch b/meta-openembedded/meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch
new file mode 100644
index 000000000..48d832754
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch
@@ -0,0 +1,73 @@
+From 87857d5cae7db94fdd776904886392b1e86053bd Mon Sep 17 00:00:00 2001
+From: Florian Bezdeka <1119693+fbezdeka@users.noreply.github.com>
+Date: Fri, 18 May 2018 18:54:56 +0200
+Subject: [PATCH] Fixed gcc 8 compilation errors (#1353)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The following errors occured during a compilation using gcc 8:
+
+In function »gids_create_file.constprop«,
+ inserted by »gids_save_certificate.isra.8« beicard-gids.c:1548:7:
+card-gids.c:465:2: Error: »strncpy« output may be truncated copying 8 bytes from a string of length 8 [-Werror=stringop-truncation]
+ strncpy(record->filename, filename, 8);
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+pkcs15-oberthur.c: In function »sc_pkcs15emu_oberthur_add_prvkey«:
+pkcs15-oberthur.c:741:5: Error: »strncpy« output may be truncated copying 254 bytes from a string of length 254 [-Werror=stringop-truncation]
+ strncpy(kobj.label, objs[ii]->label, sizeof(kobj.label) - 1);
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/pull/1353]
+Signed-off-by Khem Raj <raj.khem@gmail.com>
+---
+ src/libopensc/card-gids.c | 3 ++-
+ src/libopensc/pkcs15-oberthur.c | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/libopensc/card-gids.c b/src/libopensc/card-gids.c
+index fc5d2a7..ac3e579 100644
+--- a/src/libopensc/card-gids.c
++++ b/src/libopensc/card-gids.c
+@@ -33,6 +33,7 @@ Some features are undocumented like the format used to store certificates. They
+
+ #include <stdlib.h>
+ #include <string.h>
++#include "../common/compat_strlcpy.h"
+
+ #ifdef ENABLE_OPENSSL
+ /* openssl only needed for card administration */
+@@ -462,7 +463,7 @@ static int gids_create_file(sc_card_t *card, char* directory, char* filename) {
+ memset(masterfilebuffer + offset, 0, sizeof(gids_mf_record_t));
+ record = (gids_mf_record_t*) (masterfilebuffer + offset);
+ strncpy(record->directory, directory, 8);
+- strncpy(record->filename, filename, 8);
++ strlcpy(record->filename, filename, sizeof(record->filename));
+ record->fileIdentifier = fileIdentifier;
+ record->dataObjectIdentifier = dataObjectIdentifier;
+
+diff --git a/src/libopensc/pkcs15-oberthur.c b/src/libopensc/pkcs15-oberthur.c
+index 4f841ed..3415be7 100644
+--- a/src/libopensc/pkcs15-oberthur.c
++++ b/src/libopensc/pkcs15-oberthur.c
+@@ -29,6 +29,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
++#include "../common/compat_strlcpy.h"
+
+ #include "pkcs15.h"
+ #include "log.h"
+@@ -738,7 +739,7 @@ sc_pkcs15emu_oberthur_add_prvkey(struct sc_pkcs15_card *p15card,
+ unsigned int id = path.value[path.len - 2] * 0x100 + path.value[path.len - 1];
+
+ if (id == ccont.id_cert) {
+- strncpy(kobj.label, objs[ii]->label, sizeof(kobj.label) - 1);
++ strlcpy(kobj.label, objs[ii]->label, sizeof(kobj.label));
+ break;
+ }
+ }
+--
+2.18.0
+
OpenPOWER on IntegriCloud