diff options
Diffstat (limited to 'auth2-pubkey.c')
-rw-r--r-- | auth2-pubkey.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/auth2-pubkey.c b/auth2-pubkey.c index 7a6280f8d..271dbaf65 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth2-pubkey.c,v 1.65 2017/05/30 14:29:59 markus Exp $ */ | 1 | /* $OpenBSD: auth2-pubkey.c,v 1.66 2017/05/31 09:15:42 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -1156,9 +1156,10 @@ auth2_record_userkey(Authctxt *authctxt, struct sshkey *key) | |||
1156 | struct sshkey **tmp; | 1156 | struct sshkey **tmp; |
1157 | 1157 | ||
1158 | if (authctxt->nprev_userkeys >= INT_MAX || | 1158 | if (authctxt->nprev_userkeys >= INT_MAX || |
1159 | (tmp = reallocarray(authctxt->prev_userkeys, | 1159 | (tmp = recallocarray(authctxt->prev_userkeys, |
1160 | authctxt->nprev_userkeys + 1, sizeof(*tmp))) == NULL) | 1160 | authctxt->nprev_userkeys, authctxt->nprev_userkeys + 1, |
1161 | fatal("%s: reallocarray failed", __func__); | 1161 | sizeof(*tmp))) == NULL) |
1162 | fatal("%s: recallocarray failed", __func__); | ||
1162 | authctxt->prev_userkeys = tmp; | 1163 | authctxt->prev_userkeys = tmp; |
1163 | authctxt->prev_userkeys[authctxt->nprev_userkeys] = key; | 1164 | authctxt->prev_userkeys[authctxt->nprev_userkeys] = key; |
1164 | authctxt->nprev_userkeys++; | 1165 | authctxt->nprev_userkeys++; |