[neon/backports-focal/libaqbanking/Neon/release] debian/patches: Add 0001-AqHBCI-Remove-trailing-blanks-in-mimetype.patch to fix occasionally hidden TAN images

Micha Lenk null at kde.org
Wed Mar 24 09:53:24 GMT 2021


Git commit 8b0d26db3898597c26c62d046cbe23d4a16e04ab by Micha Lenk.
Committed on 21/02/2021 at 22:49.
Pushed by jriddell into branch 'Neon/release'.

Add 0001-AqHBCI-Remove-trailing-blanks-in-mimetype.patch to fix occasionally hidden TAN images

A  +38   -0    debian/patches/0001-AqHBCI-Remove-trailing-blanks-in-mimetype.patch
A  +1    -0    debian/patches/series

https://invent.kde.org/neon/backports-focal/libaqbanking/commit/8b0d26db3898597c26c62d046cbe23d4a16e04ab

diff --git a/debian/patches/0001-AqHBCI-Remove-trailing-blanks-in-mimetype.patch b/debian/patches/0001-AqHBCI-Remove-trailing-blanks-in-mimetype.patch
new file mode 100644
index 0000000..b20e509
--- /dev/null
+++ b/debian/patches/0001-AqHBCI-Remove-trailing-blanks-in-mimetype.patch
@@ -0,0 +1,38 @@
+Origin: upstream, commit:c80e8102ce0a466021aa94195d8c5e3db55652b9
+From: Martin Preuss <martin at aquamaniac.de>
+Date: Sat, 20 Feb 2021 16:42:43 +0100
+Subject: AqHBCI: Remove trailing blanks in mimetype.
+Last-Update: 2021-02-21
+
+---
+ src/libs/plugins/backends/aqhbci/tan/tan_image.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/libs/plugins/backends/aqhbci/tan/tan_image.c b/src/libs/plugins/backends/aqhbci/tan/tan_image.c
+index 10624fc4..e229881a 100644
+--- a/src/libs/plugins/backends/aqhbci/tan/tan_image.c
++++ b/src/libs/plugins/backends/aqhbci/tan/tan_image.c
+@@ -170,12 +170,20 @@ int _extractAndSetMimeTypeAndImageData(const uint8_t *challengePtr,
+   }
+   if (tagLen) {
+     char *mimeType;
++    int i;
+ 
+     mimeType=(char *) malloc(tagLen+1);
+     assert(mimeType);
+     memmove(mimeType, p, tagLen);
+     mimeType[tagLen]=0;
+ 
++    for (i=(tagLen-1); i>0; i--) {
++      if (mimeType[i]==32)
++	mimeType[i]=0;
++      else
++	break;
++    }
++
+     DBG_ERROR(AQHBCI_LOGDOMAIN, "Image mimetype: \"%s\"", mimeType);
+     GWEN_DB_SetCharValue(dbMethodParams, GWEN_DB_FLAGS_OVERWRITE_VARS, "mimeType", mimeType);
+     free(mimeType);
+-- 
+2.20.1
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..abded4c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-AqHBCI-Remove-trailing-blanks-in-mimetype.patch



More information about the Neon-commits mailing list