gpg: Fix comparison.
authorNeal H. Walfield <neal@g10code.com>
Fri, 6 Oct 2017 09:51:39 +0000 (11:51 +0200)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 8 Oct 2018 15:36:01 +0000 (16:36 +0100)
* 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)

Gbp-Pq: Topic from-master
Gbp-Pq: Name gpg-Fix-comparison.patch

g10/gpgcompose.c

index 430538ef7dd618e8df1613c4f8302477e9a036f2..226f7938f276fe9bf27e9760654a679b1deff1f2 100644 (file)
@@ -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)