gnupg: prevent attempt to print with %n format

Which is not allowed on android.
This commit is contained in:
Henrik Grimler 2023-01-19 20:41:38 +01:00
parent a1a0fdfe1e
commit 8c021d2825
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
2 changed files with 18 additions and 0 deletions

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Implementation of the OpenPGP standard for encrypting an
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.4.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=1d79158dd01d992431dd2e3facb89fdac97127f89784ea2cb610c600fb0c1483
TERMUX_PKG_DEPENDS="libassuan, libbz2, libgcrypt, libgnutls, libgpg-error, libksba, libnpth, libsqlite, readline, pinentry, resolv-conf, zlib"

View File

@ -0,0 +1,17 @@
--- ./g10/keylist.c~ 2022-11-25 16:05:09.000000000 +0100
+++ ./g10/keylist.c 2023-01-19 20:37:12.674592842 +0100
@@ -329,12 +329,11 @@
else
s2k_char = '#'; /* Key not found. */
- tty_fprintf (fp, "%s%c %s/%s %n",
+ tty_fprintf (fp, "%s%c %s/%s ",
node->pkt->pkttype == PKT_PUBLIC_KEY ? "sec" : "ssb",
s2k_char,
pubkey_string (pk, pkstrbuf, sizeof pkstrbuf),
- keystr_from_pk (pk),
- &indent);
+ keystr_from_pk (pk));
tty_fprintf (fp, _("created: %s"), datestr_from_pk (pk));
tty_fprintf (fp, " ");
tty_fprintf (fp, _("expires: %s"), expirestr_from_pk (pk));