diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | auth-pam.c | 6 |
2 files changed, 5 insertions, 5 deletions
@@ -36,6 +36,8 @@ | |||
36 | - jolan@cvs.openbsd.org 2007/05/17 23:53:41 | 36 | - jolan@cvs.openbsd.org 2007/05/17 23:53:41 |
37 | [sshconnect2.c] | 37 | [sshconnect2.c] |
38 | djm owes me a vb and a tism cd for breaking ssh compilation | 38 | djm owes me a vb and a tism cd for breaking ssh compilation |
39 | - (dtucker) [auth-pam.c] malloc+memset -> calloc. Patch from | ||
40 | ldv at altlinux.org. | ||
39 | 41 | ||
40 | 20070509 | 42 | 20070509 |
41 | - (tim) [configure.ac] Bug #1287: Add missing test for ucred.h. | 43 | - (tim) [configure.ac] Bug #1287: Add missing test for ucred.h. |
@@ -2936,4 +2938,4 @@ | |||
2936 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 2938 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
2937 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 2939 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
2938 | 2940 | ||
2939 | $Id: ChangeLog,v 1.4668 2007/05/20 05:11:33 dtucker Exp $ | 2941 | $Id: ChangeLog,v 1.4669 2007/05/20 05:20:08 dtucker Exp $ |
diff --git a/auth-pam.c b/auth-pam.c index c08d47229..bfd8f3270 100644 --- a/auth-pam.c +++ b/auth-pam.c | |||
@@ -686,8 +686,7 @@ sshpam_init_ctx(Authctxt *authctxt) | |||
686 | return (NULL); | 686 | return (NULL); |
687 | } | 687 | } |
688 | 688 | ||
689 | ctxt = xmalloc(sizeof *ctxt); | 689 | ctxt = xcalloc(1, sizeof *ctxt); |
690 | memset(ctxt, 0, sizeof(*ctxt)); | ||
691 | 690 | ||
692 | /* Start the authentication thread */ | 691 | /* Start the authentication thread */ |
693 | if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, socks) == -1) { | 692 | if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, socks) == -1) { |
@@ -1130,9 +1129,8 @@ sshpam_passwd_conv(int n, sshpam_const struct pam_message **msg, | |||
1130 | if (n <= 0 || n > PAM_MAX_NUM_MSG) | 1129 | if (n <= 0 || n > PAM_MAX_NUM_MSG) |
1131 | return (PAM_CONV_ERR); | 1130 | return (PAM_CONV_ERR); |
1132 | 1131 | ||
1133 | if ((reply = malloc(n * sizeof(*reply))) == NULL) | 1132 | if ((reply = calloc(n, sizeof(*reply))) == NULL) |
1134 | return (PAM_CONV_ERR); | 1133 | return (PAM_CONV_ERR); |
1135 | memset(reply, 0, n * sizeof(*reply)); | ||
1136 | 1134 | ||
1137 | for (i = 0; i < n; ++i) { | 1135 | for (i = 0; i < n; ++i) { |
1138 | switch (PAM_MSG_MEMBER(msg, i, msg_style)) { | 1136 | switch (PAM_MSG_MEMBER(msg, i, msg_style)) { |