Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37895455
en ru br
ALT Linux repos
S:0.23.0-alt2
5.0: 0.11.8-alt0.M50.1
4.1: 0.11.6-alt0.M41.1
4.0: 0.11.6-alt0.M40.1
3.0: 0.8.1-alt4.1

Group :: System/Configuration/Hardware
RPM: opensc

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: opensc-gcc11.patch
Download


diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c
index 41e620a..57f8a79 100644
--- a/src/tools/opensc-explorer.c
+++ b/src/tools/opensc-explorer.c
@@ -1839,6 +1839,12 @@ static int do_apdu(int argc, char **argv)
 	if (argc < 1)
 		return usage(do_apdu);
 
+	/* gcc-11 complains about BUF potentially being used without being
+	   initialized.  I can't convince myself that the calls to
+	   parse_string_or_hexdata will fully initialize it, so we just
+	   initialize it here.  */
+	memset (buf, 0, sizeof (buf));
+
 	/* loop over the args and parse them, making sure the result fits into buf[] */
 	for (i = 0, len = 0; i < (unsigned) argc && len < sizeof(buf); i++)   {
 		size_t len0 = sizeof(buf) - len;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin