[Freeipa-devel] [PATCH] 0193 fix Coverity issue in extdom plugin
Alexander Bokovoy
abokovoy at redhat.com
Mon Jul 20 13:23:06 UTC 2015
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
-------------- next part --------------
From b4a2ce6eb23843616b3afbcd9cf67b6653d99970 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy at 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
More information about the Freeipa-devel
mailing list