[openssh-commits] [openssh] 01/01: Check for NULL from malloc.
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Mar 10 13:43:28 AEDT 2017
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit bee0167be2340d8de4bdc1ab1064ec957c85a447
Author: Darren Tucker <dtucker at zip.com.au>
Date: Fri Mar 10 13:40:18 2017 +1100
Check for NULL from malloc.
Part of bz#2687, from jjelen at redhat.com.
---
auth-pam.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/auth-pam.c b/auth-pam.c
index 7d8b292..bc8e5e0 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -830,6 +830,8 @@ fake_password(const char *wire_password)
fatal("%s: password length too long: %zu", __func__, l);
ret = malloc(l + 1);
+ if (ret == NULL)
+ return NULL;
for (i = 0; i < l; i++)
ret[i] = junk[i % (sizeof(junk) - 1)];
ret[i] = '\0';
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list