diff options
-rw-r--r-- | auth-pam.c | 4 | ||||
-rw-r--r-- | uidswap.c | 4 |
2 files changed, 4 insertions, 4 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, | |||
738 | case PAM_PROMPT_ECHO_OFF: | 738 | case PAM_PROMPT_ECHO_OFF: |
739 | *num = 1; | 739 | *num = 1; |
740 | len = plen + mlen + 1; | 740 | len = plen + mlen + 1; |
741 | **prompts = xrealloc(**prompts, 1, len); | 741 | **prompts = xreallocarray(**prompts, 1, len); |
742 | strlcpy(**prompts + plen, msg, len - plen); | 742 | strlcpy(**prompts + plen, msg, len - plen); |
743 | plen += mlen; | 743 | plen += mlen; |
744 | **echo_on = (type == PAM_PROMPT_ECHO_ON); | 744 | **echo_on = (type == PAM_PROMPT_ECHO_ON); |
@@ -748,7 +748,7 @@ sshpam_query(void *ctx, char **name, char **info, | |||
748 | case PAM_TEXT_INFO: | 748 | case PAM_TEXT_INFO: |
749 | /* accumulate messages */ | 749 | /* accumulate messages */ |
750 | len = plen + mlen + 2; | 750 | len = plen + mlen + 2; |
751 | **prompts = xrealloc(**prompts, 1, len); | 751 | **prompts = xreallocarray(**prompts, 1, len); |
752 | strlcpy(**prompts + plen, msg, len - plen); | 752 | strlcpy(**prompts + plen, msg, len - plen); |
753 | plen += mlen; | 753 | plen += mlen; |
754 | strlcat(**prompts + plen, "\n", len - plen); | 754 | strlcat(**prompts + plen, "\n", len - plen); |
@@ -86,7 +86,7 @@ temporarily_use_uid(struct passwd *pw) | |||
86 | if (saved_egroupslen < 0) | 86 | if (saved_egroupslen < 0) |
87 | fatal("getgroups: %.100s", strerror(errno)); | 87 | fatal("getgroups: %.100s", strerror(errno)); |
88 | if (saved_egroupslen > 0) { | 88 | if (saved_egroupslen > 0) { |
89 | saved_egroups = xrealloc(saved_egroups, | 89 | saved_egroups = xreallocarray(saved_egroups, |
90 | saved_egroupslen, sizeof(gid_t)); | 90 | saved_egroupslen, sizeof(gid_t)); |
91 | if (getgroups(saved_egroupslen, saved_egroups) < 0) | 91 | if (getgroups(saved_egroupslen, saved_egroups) < 0) |
92 | fatal("getgroups: %.100s", strerror(errno)); | 92 | fatal("getgroups: %.100s", strerror(errno)); |
@@ -104,7 +104,7 @@ temporarily_use_uid(struct passwd *pw) | |||
104 | if (user_groupslen < 0) | 104 | if (user_groupslen < 0) |
105 | fatal("getgroups: %.100s", strerror(errno)); | 105 | fatal("getgroups: %.100s", strerror(errno)); |
106 | if (user_groupslen > 0) { | 106 | if (user_groupslen > 0) { |
107 | user_groups = xrealloc(user_groups, | 107 | user_groups = xreallocarray(user_groups, |
108 | user_groupslen, sizeof(gid_t)); | 108 | user_groupslen, sizeof(gid_t)); |
109 | if (getgroups(user_groupslen, user_groups) < 0) | 109 | if (getgroups(user_groupslen, user_groups) < 0) |
110 | fatal("getgroups: %.100s", strerror(errno)); | 110 | fatal("getgroups: %.100s", strerror(errno)); |