diff options
author | Darren Tucker <dtucker@zip.com.au> | 2015-04-30 01:18:11 +0200 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2015-04-30 01:18:11 +0200 |
commit | d1680d36e17244d9af3843aeb5025cb8e40d6c07 (patch) | |
tree | 8123d103e6ddb6bb6f1d9bf53d8177f6ab4eef0b /auth-pam.c | |
parent | upstream commit (diff) | |
download | openssh-d1680d36e17244d9af3843aeb5025cb8e40d6c07.tar.xz openssh-d1680d36e17244d9af3843aeb5025cb8e40d6c07.zip |
xrealloc -> xreallocarray in portable code too.
Diffstat (limited to 'auth-pam.c')
-rw-r--r-- | auth-pam.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/auth-pam.c b/auth-pam.c index d789bad7b..d94c8285b 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -738,7 +738,7 @@ sshpam_query(void *ctx, char **name, char **info, case PAM_PROMPT_ECHO_OFF: *num = 1; len = plen + mlen + 1; - **prompts = xrealloc(**prompts, 1, len); + **prompts = xreallocarray(**prompts, 1, len); strlcpy(**prompts + plen, msg, len - plen); plen += mlen; **echo_on = (type == PAM_PROMPT_ECHO_ON); @@ -748,7 +748,7 @@ sshpam_query(void *ctx, char **name, char **info, case PAM_TEXT_INFO: /* accumulate messages */ len = plen + mlen + 2; - **prompts = xrealloc(**prompts, 1, len); + **prompts = xreallocarray(**prompts, 1, len); strlcpy(**prompts + plen, msg, len - plen); plen += mlen; strlcat(**prompts + plen, "\n", len - plen); |