diff options
author | Colin Watson <cjwatson@debian.org> | 2016-12-20 00:22:52 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2016-12-20 00:22:52 +0000 |
commit | 971a7653746a6972b907dfe0ce139c06e4a6f482 (patch) | |
tree | 70fb964265d57ae4967be55b75dbb2a122e9b969 /kexgexs.c | |
parent | a8ed8d256b2e2c05b0c15565a7938028c5192277 (diff) | |
parent | 4a354fc231174901f2629437c2a6e924a2dd6772 (diff) |
Import openssh_7.4p1.orig.tar.gz
Diffstat (limited to 'kexgexs.c')
-rw-r--r-- | kexgexs.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kexgexs.c,v 1.29 2016/06/08 02:13:01 dtucker Exp $ */ | 1 | /* $OpenBSD: kexgexs.c,v 1.30 2016/09/12 01:22:38 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Niels Provos. All rights reserved. | 3 | * Copyright (c) 2000 Niels Provos. All rights reserved. |
4 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #ifdef WITH_OPENSSL | 29 | #ifdef WITH_OPENSSL |
30 | 30 | ||
31 | #include <sys/param.h> /* MIN MAX */ | ||
32 | 31 | ||
33 | #include <stdarg.h> | 32 | #include <stdarg.h> |
34 | #include <stdio.h> | 33 | #include <stdio.h> |
@@ -53,6 +52,7 @@ | |||
53 | #include "dispatch.h" | 52 | #include "dispatch.h" |
54 | #include "ssherr.h" | 53 | #include "ssherr.h" |
55 | #include "sshbuf.h" | 54 | #include "sshbuf.h" |
55 | #include "misc.h" | ||
56 | 56 | ||
57 | static int input_kex_dh_gex_request(int, u_int32_t, void *); | 57 | static int input_kex_dh_gex_request(int, u_int32_t, void *); |
58 | static int input_kex_dh_gex_init(int, u_int32_t, void *); | 58 | static int input_kex_dh_gex_init(int, u_int32_t, void *); |
@@ -83,10 +83,10 @@ input_kex_dh_gex_request(int type, u_int32_t seq, void *ctxt) | |||
83 | kex->nbits = nbits; | 83 | kex->nbits = nbits; |
84 | kex->min = min; | 84 | kex->min = min; |
85 | kex->max = max; | 85 | kex->max = max; |
86 | min = MAX(DH_GRP_MIN, min); | 86 | min = MAXIMUM(DH_GRP_MIN, min); |
87 | max = MIN(DH_GRP_MAX, max); | 87 | max = MINIMUM(DH_GRP_MAX, max); |
88 | nbits = MAX(DH_GRP_MIN, nbits); | 88 | nbits = MAXIMUM(DH_GRP_MIN, nbits); |
89 | nbits = MIN(DH_GRP_MAX, nbits); | 89 | nbits = MINIMUM(DH_GRP_MAX, nbits); |
90 | 90 | ||
91 | if (kex->max < kex->min || kex->nbits < kex->min || | 91 | if (kex->max < kex->min || kex->nbits < kex->min || |
92 | kex->max < kex->nbits || kex->max < DH_GRP_MIN) { | 92 | kex->max < kex->nbits || kex->max < DH_GRP_MIN) { |