summaryrefslogtreecommitdiffstats
path: root/dh.c
diff options
context:
space:
mode:
authormillert@openbsd.org <millert@openbsd.org>2018-06-26 13:23:59 +0200
committerDarren Tucker <dtucker@dtucker.net>2018-07-03 03:08:29 +0200
commit6f56fe4b9578b0627667f8bce69d4d938a88324c (patch)
tree5155d28de869d169798f1624591fbe0fd6a7586b /dh.c
parentupstream: One ampersand is enough to backgroud an process. OpenBSD (diff)
downloadopenssh-6f56fe4b9578b0627667f8bce69d4d938a88324c.tar.xz
openssh-6f56fe4b9578b0627667f8bce69d4d938a88324c.zip
upstream: Fix "WARNING: line 6 disappeared in /etc/moduli, giving up"
when choosing a prime. An extra increment of linenum snuck in as part of the conversion to getline(). OK djm@ markus@ OpenBSD-Commit-ID: 0019225cb52ed621b71cd9f19ee2e78e57e3dd38
Diffstat (limited to 'dh.c')
-rw-r--r--dh.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/dh.c b/dh.c
index 16eb13276..faa19a166 100644
--- a/dh.c
+++ b/dh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh.c,v 1.64 2018/06/06 18:29:18 markus Exp $ */
+/* $OpenBSD: dh.c,v 1.65 2018/06/26 11:23:59 millert Exp $ */
/*
* Copyright (c) 2000 Niels Provos. All rights reserved.
*
@@ -190,7 +190,6 @@ choose_dh(int min, int wantbits, int max)
linenum = 0;
which = arc4random_uniform(bestcount);
while (getline(&line, &linesize, f) != -1) {
- linenum++;
if (!parse_prime(linenum, line, &dhg))
continue;
if ((dhg.size > max || dhg.size < min) ||