diff options
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 84f13c42f..25c2cfd84 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-keygen.c,v 1.141 2006/03/25 13:17:02 djm Exp $ */ | 1 | /* $OpenBSD: ssh-keygen.c,v 1.142 2006/03/25 18:40:14 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1075,7 +1075,7 @@ main(int ac, char **av) | |||
1075 | "degiqpclBHvxXyF:b:f:t:U:D:P:N:C:r:g:R:T:G:M:S:a:W:")) != -1) { | 1075 | "degiqpclBHvxXyF:b:f:t:U:D:P:N:C:r:g:R:T:G:M:S:a:W:")) != -1) { |
1076 | switch (opt) { | 1076 | switch (opt) { |
1077 | case 'b': | 1077 | case 'b': |
1078 | bits = strtonum(optarg, 768, 32768, &errstr); | 1078 | bits = (u_int32_t)strtonum(optarg, 768, 32768, &errstr); |
1079 | if (errstr) | 1079 | if (errstr) |
1080 | fatal("Bits has bad value %s (%s)", | 1080 | fatal("Bits has bad value %s (%s)", |
1081 | optarg, errstr); | 1081 | optarg, errstr); |
@@ -1162,19 +1162,20 @@ main(int ac, char **av) | |||
1162 | rr_hostname = optarg; | 1162 | rr_hostname = optarg; |
1163 | break; | 1163 | break; |
1164 | case 'W': | 1164 | case 'W': |
1165 | generator_wanted = strtonum(optarg, 1, UINT_MAX, &errstr); | 1165 | generator_wanted = (u_int32_t)strtonum(optarg, 1, |
1166 | UINT_MAX, &errstr); | ||
1166 | if (errstr) | 1167 | if (errstr) |
1167 | fatal("Desired generator has bad value: %s (%s)", | 1168 | fatal("Desired generator has bad value: %s (%s)", |
1168 | optarg, errstr); | 1169 | optarg, errstr); |
1169 | break; | 1170 | break; |
1170 | case 'a': | 1171 | case 'a': |
1171 | trials = strtonum(optarg, 1, UINT_MAX, &errstr); | 1172 | trials = (u_int32_t)strtonum(optarg, 1, UINT_MAX, &errstr); |
1172 | if (errstr) | 1173 | if (errstr) |
1173 | fatal("Invalid number of trials: %s (%s)", | 1174 | fatal("Invalid number of trials: %s (%s)", |
1174 | optarg, errstr); | 1175 | optarg, errstr); |
1175 | break; | 1176 | break; |
1176 | case 'M': | 1177 | case 'M': |
1177 | memory = strtonum(optarg, 1, UINT_MAX, &errstr); | 1178 | memory = (u_int32_t)strtonum(optarg, 1, UINT_MAX, &errstr); |
1178 | if (errstr) { | 1179 | if (errstr) { |
1179 | fatal("Memory limit is %s: %s", errstr, optarg); | 1180 | fatal("Memory limit is %s: %s", errstr, optarg); |
1180 | } | 1181 | } |