Fix strtonum range to unbreak -pass fd:0
authorlteo <lteo@openbsd.org>
Sat, 19 Jul 2014 03:40:26 +0000 (03:40 +0000)
committerlteo <lteo@openbsd.org>
Sat, 19 Jul 2014 03:40:26 +0000 (03:40 +0000)
ok deraadt@

lib/libssl/src/apps/apps.c

index 051f6f8..f9e8452 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: apps.c,v 1.67 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: apps.c,v 1.68 2014/07/19 03:40:26 lteo Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -493,7 +493,7 @@ app_get_pass(BIO *err, char *arg, int keepbio)
                        }
                } else if (!strncmp(arg, "fd:", 3)) {
                        BIO *btmp;
-                       i = strtonum(arg + 3, 1, INT_MAX, &errstr);
+                       i = strtonum(arg + 3, 0, INT_MAX, &errstr);
                        if (errstr) {
                                BIO_printf(err,
                                    "Invalid file descriptor %s: %s\n",