diff options
author | Darren Tucker <dtucker@zip.com.au> | 2017-03-10 13:40:18 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2017-03-10 13:41:55 +1100 |
commit | 215af43cb2f7397523f4696756c2040c8083ec30 (patch) | |
tree | f08056e60b9fe96037208df24e5aaa18b14228d0 | |
parent | 6f14de011f0d1586c607ef94270651722d0b4cb2 (diff) |
Check for NULL from malloc.V_7_4
Part of bz#2687, from jjelen at redhat.com.
-rw-r--r-- | auth-pam.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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'; |