Control: tags 1013011 + patch
Control: tags 1013011 + pending

Dear maintainer,

I've prepared an NMU for opensc (versioned as 0.22.0-2.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards,
  Reiner
diff -Nru opensc-0.22.0/debian/changelog opensc-0.22.0/debian/changelog
--- opensc-0.22.0/debian/changelog	2022-01-31 07:02:55.000000000 +0100
+++ opensc-0.22.0/debian/changelog	2022-10-15 18:26:16.000000000 +0200
@@ -1,3 +1,10 @@
+opensc (0.22.0-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Import patch to fix usage of pointer after realloc (Closes: #1013011)
+
+ -- Reiner Herrmann <rei...@reiner-h.de>  Sat, 15 Oct 2022 18:26:16 +0200
+
 opensc (0.22.0-2) unstable; urgency=medium
 
   [ Debian Janitor ]
diff -Nru opensc-0.22.0/debian/patches/gcc12.patch opensc-0.22.0/debian/patches/gcc12.patch
--- opensc-0.22.0/debian/patches/gcc12.patch	1970-01-01 01:00:00.000000000 +0100
+++ opensc-0.22.0/debian/patches/gcc12.patch	2022-10-15 18:26:16.000000000 +0200
@@ -0,0 +1,31 @@
+From 0f7082ea46562b15221f428860b993e0519c6cbd Mon Sep 17 00:00:00 2001
+From: Veronika Hanulikova <vhanu...@redhat.com>
+Date: Wed, 16 Feb 2022 11:59:27 +0100
+Bug-Debian: https://bugs.debian.org/1013011
+Subject: [PATCH] Fix usage of pointer after realloc
+
+---
+ src/sm/sm-iso.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/sm/sm-iso.c b/src/sm/sm-iso.c
+index 5baded77c6..2c3f6bcabd 100644
+--- a/src/sm/sm-iso.c
++++ b/src/sm/sm-iso.c
+@@ -181,13 +181,14 @@ static int format_le(size_t le, struct sc_asn1_entry *le_entry,
+ 
+ static int prefix_buf(u8 prefix, u8 *buf, size_t buflen, u8 **cat)
+ {
+-	u8 *p;
++	u8 *p = NULL;
++	int ptr_same = *cat == buf;
+ 
+ 	p = realloc(*cat, buflen + 1);
+ 	if (!p)
+ 		return SC_ERROR_OUT_OF_MEMORY;
+ 
+-	if (*cat == buf) {
++	if (ptr_same) {
+ 		memmove(p + 1, p, buflen);
+ 	} else {
+ 		/* Flawfinder: ignore */
diff -Nru opensc-0.22.0/debian/patches/series opensc-0.22.0/debian/patches/series
--- opensc-0.22.0/debian/patches/series	2022-01-31 07:02:55.000000000 +0100
+++ opensc-0.22.0/debian/patches/series	2022-10-15 18:26:16.000000000 +0200
@@ -1 +1,2 @@
 0001-Use-sysconfdir-opensc-for-opensc.conf.patch
+gcc12.patch

Reply via email to