diff options
author | 2018-06-26 11:23:59 +0000 | |
---|---|---|
committer | 2018-06-26 11:23:59 +0000 | |
commit | 04d6f81fd5888033b973d0bd2c39a09f65b52608 (patch) | |
tree | 033451e2e0a88c673a8eef4498101f0eb82c41d5 | |
parent | Do not take address of a member of a NULL pointer. GitHub issue 1382 (diff) | |
download | wireguard-openbsd-04d6f81fd5888033b973d0bd2c39a09f65b52608.tar.xz wireguard-openbsd-04d6f81fd5888033b973d0bd2c39a09f65b52608.zip |
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@
-rw-r--r-- | usr.bin/ssh/dh.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/ssh/dh.c b/usr.bin/ssh/dh.c index c029c0a1b37..9ebde8f7a0f 100644 --- a/usr.bin/ssh/dh.c +++ b/usr.bin/ssh/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. * @@ -186,7 +186,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) || |