diff options
author | Ed Tanous <edtanous@google.com> | 2022-01-07 20:40:43 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-01-12 22:00:37 +0300 |
commit | fcc5aa66f2dca9f33c70df8dcd828ac4f31d7a92 (patch) | |
tree | 2774efcc0ef853345648297b2c9df407987d0453 /include/pam_authenticate.hpp | |
parent | 49d1eeaab4085cd0284ee041f4775aaa982074c6 (diff) | |
download | bmcweb-fcc5aa66f2dca9f33c70df8dcd828ac4f31d7a92.tar.xz |
Enable malloc checks
We only use malloc in one place, when we hand a pointer off to PAM.
Ignore that one issue, and enable the check.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I37c41c193bae1bab370b03944617c642df0179fc
Diffstat (limited to 'include/pam_authenticate.hpp')
-rw-r--r-- | include/pam_authenticate.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/pam_authenticate.hpp b/include/pam_authenticate.hpp index 10d9116156..ca8c8d3250 100644 --- a/include/pam_authenticate.hpp +++ b/include/pam_authenticate.hpp @@ -57,9 +57,11 @@ inline int pamFunctionConversation(int numMsg, const struct pam_message** msg, std::strncpy(pass, appPass, appPassSize + 1); size_t numMsgSize = static_cast<size_t>(numMsg); + // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) void* ptr = calloc(numMsgSize, sizeof(struct pam_response)); if (ptr == nullptr) { + // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) free(pass); return PAM_BUF_ERR; } |