Package: gnupg2 / 2.2.12-1+deb10u1

from-2.2.14/gpg-Fix-comparison.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: "Neal H. Walfield" <neal@g10code.com>
Date: Fri, 6 Oct 2017 11:51:39 +0200
Subject: gpg: Fix comparison.

* g10/gpgcompose.c (literal_name): Complain if passed zero arguments,
not one or fewer.

Signed-off-by: Neal H. Walfield <neal@walfield.org>
(cherry picked from commit 1ed21eee79749b976b4a935f2279b162634e9c5e)
---
 g10/gpgcompose.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/g10/gpgcompose.c b/g10/gpgcompose.c
index 430538e..226f793 100644
--- a/g10/gpgcompose.c
+++ b/g10/gpgcompose.c
@@ -2746,7 +2746,7 @@ literal_name (const char *option, int argc, char *argv[], void *cookie)
 {
   struct litinfo *li = cookie;
 
-  if (argc <= 1)
+  if (argc <= 0)
     log_fatal ("Usage: %s NAME\n", option);
 
   if (strlen (argv[0]) > 255)