Hi, this patch fixes Coverity CID 13130. The bug turned out to be impossible to cause crash in 389-ds externally because all conditions that could cause not to properly allocate req could not be influenced via extended operation (req could be NULL only if calloc() in parse_request_data() failed).
The finding is still correct as calloc() indeed could fail. -- / Alexander Bokovoy
From b4a2ce6eb23843616b3afbcd9cf67b6653d99970 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy <aboko...@redhat.com> Date: Mon, 20 Jul 2015 14:31:33 +0300 Subject: [PATCH] extdom: do not fail to process error case when no request is specified Coverity CID 13130 --- daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c index 708d0e4..81fe5a6 100644 --- a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c +++ b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c @@ -149,7 +149,7 @@ static int ipa_extdom_extop(Slapi_PBlock *pb) rc = LDAP_SUCCESS; done: - if (req->err_msg != NULL) { + if ((req != NULL) && (req->err_msg != NULL)) { err_msg = req->err_msg; } if (err_msg != NULL) { -- 2.4.3
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code