Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 613056 - fix coverity Defect Type: Null pointer dereferences issues 11892 - 11939
fix coverity Defect Type: Null pointer dereferences issues 11892 - 11939
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Retired
Component: Directory Server (Show other bugs)
1.2.7
All All
high Severity low
: ---
: ---
Assigned To: Rich Megginson
Viktor Ashirov
:
Depends On:
Blocks: 389_1.2.7 639035
  Show dependency treegraph
 
Reported: 2010-07-09 11:43 EDT by Endi Sukma Dewata
Modified: 2015-12-07 11:40 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 11:40:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
0001-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.82 KB, patch)
2010-07-09 21:44 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0002-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.50 KB, patch)
2010-07-09 21:45 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0003-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.13 KB, patch)
2010-07-09 21:45 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0004-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (2.21 KB, patch)
2010-07-09 21:46 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0005-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.49 KB, patch)
2010-07-09 21:46 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0006-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.23 KB, patch)
2010-07-09 21:46 EDT, Endi Sukma Dewata
nhosoi: review-
Details | Diff
0007-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.32 KB, patch)
2010-07-09 21:47 EDT, Endi Sukma Dewata
nhosoi: review-
Details | Diff
0008-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (3.45 KB, patch)
2010-07-09 21:47 EDT, Endi Sukma Dewata
nhosoi: review-
Details | Diff
0009-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (2.09 KB, patch)
2010-07-09 21:48 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0010-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (2.33 KB, patch)
2010-07-09 21:49 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0011-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.41 KB, patch)
2010-07-09 21:49 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0012-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.97 KB, patch)
2010-07-09 21:50 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0013-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.07 KB, patch)
2010-07-09 21:50 EDT, Endi Sukma Dewata
nhosoi: review-
Details | Diff
0014-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.29 KB, patch)
2010-07-09 21:51 EDT, Endi Sukma Dewata
nhosoi: review-
Details | Diff
0015-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.29 KB, patch)
2010-07-09 21:51 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0016-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.39 KB, patch)
2010-07-09 21:52 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0017-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.02 KB, patch)
2010-07-09 21:53 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0018-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.22 KB, patch)
2010-07-09 21:54 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0019-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (3.09 KB, patch)
2010-07-09 21:55 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0020-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.10 KB, patch)
2010-07-09 21:56 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0021-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.58 KB, patch)
2010-07-09 21:56 EDT, Endi Sukma Dewata
nhosoi: review-
Details | Diff
0022-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.12 KB, patch)
2010-07-09 21:57 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0023-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.06 KB, patch)
2010-07-09 21:57 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0024-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (2.32 KB, patch)
2010-07-09 21:58 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0025-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (2.06 KB, patch)
2010-07-09 21:58 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0026-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.10 KB, patch)
2010-07-09 21:58 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0027-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (3.21 KB, patch)
2010-07-09 21:59 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0028-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.68 KB, patch)
2010-07-09 22:00 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0029-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.71 KB, patch)
2010-07-09 22:01 EDT, Endi Sukma Dewata
nhosoi: review-
Details | Diff
0030-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.22 KB, patch)
2010-07-09 22:02 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0031-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.07 KB, patch)
2010-07-09 22:02 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0006a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.77 KB, patch)
2010-08-17 12:39 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0008a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (3.45 KB, patch)
2010-08-17 12:41 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0013a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.14 KB, patch)
2010-08-17 12:45 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0014a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (3.08 KB, patch)
2010-08-17 12:47 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0021a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.56 KB, patch)
2010-08-17 12:51 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0029a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch (1.91 KB, patch)
2010-08-17 12:53 EDT, Endi Sukma Dewata
nhosoi: review+
Details | Diff

  None (edit)
Description Endi Sukma Dewata 2010-07-09 11:43:50 EDT
fix coverity Defect Type: Null pointer dereferences issues 11892 - 11939
Comment 2 Endi Sukma Dewata 2010-07-09 21:44:39 EDT
Created attachment 430784 [details]
0001-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 3 Endi Sukma Dewata 2010-07-09 21:45:07 EDT
Created attachment 430785 [details]
0002-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 4 Endi Sukma Dewata 2010-07-09 21:45:28 EDT
Created attachment 430786 [details]
0003-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 5 Endi Sukma Dewata 2010-07-09 21:46:03 EDT
Created attachment 430787 [details]
0004-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 6 Endi Sukma Dewata 2010-07-09 21:46:38 EDT
Created attachment 430788 [details]
0005-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 7 Endi Sukma Dewata 2010-07-09 21:46:56 EDT
Created attachment 430789 [details]
0006-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 8 Endi Sukma Dewata 2010-07-09 21:47:18 EDT
Created attachment 430790 [details]
0007-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 9 Endi Sukma Dewata 2010-07-09 21:47:54 EDT
Created attachment 430791 [details]
0008-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 10 Endi Sukma Dewata 2010-07-09 21:48:13 EDT
Created attachment 430792 [details]
0009-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 11 Endi Sukma Dewata 2010-07-09 21:49:13 EDT
Created attachment 430793 [details]
0010-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 12 Endi Sukma Dewata 2010-07-09 21:49:47 EDT
Created attachment 430794 [details]
0011-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 13 Endi Sukma Dewata 2010-07-09 21:50:16 EDT
Created attachment 430796 [details]
0012-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 14 Endi Sukma Dewata 2010-07-09 21:50:51 EDT
Created attachment 430797 [details]
0013-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 15 Endi Sukma Dewata 2010-07-09 21:51:15 EDT
Created attachment 430798 [details]
0014-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 16 Endi Sukma Dewata 2010-07-09 21:51:45 EDT
Created attachment 430799 [details]
0015-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 17 Endi Sukma Dewata 2010-07-09 21:52:35 EDT
Created attachment 430800 [details]
0016-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 18 Endi Sukma Dewata 2010-07-09 21:53:04 EDT
Created attachment 430801 [details]
0017-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 19 Endi Sukma Dewata 2010-07-09 21:54:53 EDT
Created attachment 430802 [details]
0018-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 20 Endi Sukma Dewata 2010-07-09 21:55:30 EDT
Created attachment 430804 [details]
0019-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 21 Endi Sukma Dewata 2010-07-09 21:56:08 EDT
Created attachment 430805 [details]
0020-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 22 Endi Sukma Dewata 2010-07-09 21:56:49 EDT
Created attachment 430806 [details]
0021-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 23 Endi Sukma Dewata 2010-07-09 21:57:17 EDT
Created attachment 430807 [details]
0022-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 24 Endi Sukma Dewata 2010-07-09 21:57:40 EDT
Created attachment 430808 [details]
0023-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 25 Endi Sukma Dewata 2010-07-09 21:58:09 EDT
Created attachment 430809 [details]
0024-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 26 Endi Sukma Dewata 2010-07-09 21:58:36 EDT
Created attachment 430810 [details]
0025-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 27 Endi Sukma Dewata 2010-07-09 21:58:56 EDT
Created attachment 430811 [details]
0026-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 28 Endi Sukma Dewata 2010-07-09 21:59:18 EDT
Created attachment 430812 [details]
0027-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 29 Endi Sukma Dewata 2010-07-09 22:00:17 EDT
Created attachment 430815 [details]
0028-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 30 Endi Sukma Dewata 2010-07-09 22:01:51 EDT
Created attachment 430816 [details]
0029-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 31 Endi Sukma Dewata 2010-07-09 22:02:17 EDT
Created attachment 430817 [details]
0030-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 32 Endi Sukma Dewata 2010-07-09 22:02:41 EDT
Created attachment 430818 [details]
0031-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch
Comment 38 Noriko Hosoi 2010-08-13 13:33:03 EDT
Comment on attachment 430788 [details]
0005-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=11897&streamDefectId=12083&defectInstanceId=13947&fileInstanceId=49560

Note: removing if (notify) check from inside of the do loop is okay since it's guaranteed to be non-NULL at the first round "head != NULL".
Comment 39 Noriko Hosoi 2010-08-13 13:48:23 EDT
Comment on attachment 430789 [details]
0006-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

We should check the NULL value before and after the normalization. ("after-check" is needed only when normalization is executed.)

@@ -330,9 +330,14 @@ value_cmp(
 		}
 	}
 
+	if ( !v1->bv_val || !v2->bv_val ) {
+		LDAPDebug(LDAP_DEBUG_PLUGIN, "missing value\n", 0, 0, 0);
+		goto done;
+	}
+
 	if (syntax & SYNTAX_INT) {

Also, the return value (rc) should be something like this (since it's a function to compare values and there's no "error return"):

if (v1->bv_val) {
    if (!v2->bv_val) {
        rc = 1;
        goto done;
    }
} else {
    if (v2->bv_val) {
        rc = -1;
        goto done;
    } else {
        rc = 0;
        goto done;
    }
}
Comment 41 Noriko Hosoi 2010-08-13 14:11:32 EDT
Comment on attachment 430790 [details]
0007-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

Rather, I'd like to change slapi_free_search_results_internal to accept NULL pblock.  (note: slapi_pblock_destroy already does that)

Also, the problem is not the return value from slapi_pblock_new, but there is a chance to jump to bail before assigning non-NULL value to search_pb.

Another note: as long as using slapi_ch_*alloc, DS never gets NULL from *alloc functions.  It does exit.

diff --git a/ldap/servers/slapd/plugin_internal_op.c b/ldap/servers/slapd/plugin
index 2707149..e13d796 100644
--- a/ldap/servers/slapd/plugin_internal_op.c
+++ b/ldap/servers/slapd/plugin_internal_op.c
@@ -463,7 +463,11 @@ void
 slapi_free_search_results_internal(Slapi_PBlock *pb)
 {
     int i;
-       
+
+    if (NULL == pb) {
+        return;
+    }
+
     if(pb->pb_plugin_internal_search_op_entries != NULL)
     {
         for(i=0; pb->pb_plugin_internal_search_op_entries[i] != NULL; i++)
Comment 42 Noriko Hosoi 2010-08-13 14:20:42 EDT
Comment on attachment 430806 [details]
0021-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

If you "goto free_and_return", it should be done after "ctrls" is initialized.  Instead, you could just "return LDAP_OPERATIONS_ERROR" there.

+	if (!pb) {
+		LDAPDebug( LDAP_DEBUG_ANY, "get_ldapmessage_controls: NULL PBlock\n", 0, 0, 0 );
+		rc = LDAP_OPERATIONS_ERROR;	/* unexpected error */
+		goto free_and_return;
+	}
+
Comment 43 Noriko Hosoi 2010-08-13 14:29:09 EDT
Comment on attachment 430791 [details]
0008-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

Overall, the patch looks good.  Please use slapi_ch_free_string instead of "if (subject) free (subject);"

562	done:
563		if (subject) free (subject);
==>
564		slapi_ch_free_string(&subject);
Comment 45 Noriko Hosoi 2010-08-13 14:40:03 EDT
Comment on attachment 430797 [details]
0013-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

Please put the error check after PR_ASSERT.  The author believes foreman never gets NULL.  If we build the server with debugging enabled, the server quits if the assertion fails.  This is needed for debugging.

@@ -703,6 +703,10 @@ static int import_monitor_threads(ImportJob *job, int *status)
 
     if (job->flags & FLAG_USE_FILES)
         PR_ASSERT(producer != NULL);

     PR_ASSERT(foreman != NULL);
 
+
+    if (!foreman) {
+        goto error_abort;
+    }
Comment 53 Noriko Hosoi 2010-08-13 16:32:04 EDT
Comment on attachment 430798 [details]
0014-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=11917&streamDefectId=12103&defectInstanceId=13967&fileInstanceId=49303

This patch itself is good.  But, sorry, now the caller of index_index2prefix should take care of the possibility of NULL return from index_index2prefix.
Comment 68 Noriko Hosoi 2010-08-13 17:32:22 EDT
Comment on attachment 430816 [details]
0029-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=11934&streamDefectId=12120&defectInstanceId=13985&fileInstanceId=49111

Why don't we change destroy_task, instead?

diff --git a/ldap/servers/slapd/task.c b/ldap/servers/slapd/task.c
index a7fe789..a39c70d 100644
--- a/ldap/servers/slapd/task.c
+++ b/ldap/servers/slapd/task.c
@@ -540,6 +540,10 @@ destroy_task(time_t when, void *arg)
     Slapi_Task *t1;
     Slapi_PBlock *pb = slapi_pblock_new();
 
+    if (NULL == task) {
+        return;
+    }
+
     /* Call the custom destructor callback if one was provided,
      * then perform the internal task destruction. */
     if (task->destructor != NULL) {
Comment 69 Noriko Hosoi 2010-08-13 17:35:12 EDT
Comment on attachment 430816 [details]
0029-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=11935&streamDefectId=12121&defectInstanceId=13986&fileInstanceId=49111

Note: @@ -1737,7 +1737,14 @@ task_upgradedb_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
 is good
Comment 73 Noriko Hosoi 2010-08-13 18:18:37 EDT
(In reply to comment #41)
Never mind the suggestion I made for slapi_free_search_results_internal.  You already fixed in the patch 0026.  Still, you don't need the patch 0007 since slapi_pblock_new never returns NULL.

> (From update of attachment 430790 [details])
> Rather, I'd like to change slapi_free_search_results_internal to accept NULL
> pblock.  (note: slapi_pblock_destroy already does that)
> 
> Also, the problem is not the return value from slapi_pblock_new, but there is a
> chance to jump to bail before assigning non-NULL value to search_pb.
> 
> Another note: as long as using slapi_ch_*alloc, DS never gets NULL from *alloc
> functions.  It does exit.
> 
> diff --git a/ldap/servers/slapd/plugin_internal_op.c
> b/ldap/servers/slapd/plugin
> index 2707149..e13d796 100644
> --- a/ldap/servers/slapd/plugin_internal_op.c
> +++ b/ldap/servers/slapd/plugin_internal_op.c
> @@ -463,7 +463,11 @@ void
>  slapi_free_search_results_internal(Slapi_PBlock *pb)
>  {
>      int i;
> -       
> +
> +    if (NULL == pb) {
> +        return;
> +    }
> +
>      if(pb->pb_plugin_internal_search_op_entries != NULL)
>      {
>          for(i=0; pb->pb_plugin_internal_search_op_entries[i] != NULL; i++)
Comment 76 Endi Sukma Dewata 2010-08-17 12:39:26 EDT
Created attachment 439156 [details]
0006a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

The patch has been modified to check for NULL values before and after normalization.
Comment 77 Endi Sukma Dewata 2010-08-17 12:41:41 EDT
Created attachment 439157 [details]
0008a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

The patch has been modified to call slapi_ch_free_string(&subject).
Comment 78 Endi Sukma Dewata 2010-08-17 12:45:05 EDT
Created attachment 439159 [details]
0013a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

The patch has been modified to check the NULL value after PR_ASSERT().
Comment 79 Endi Sukma Dewata 2010-08-17 12:47:37 EDT
Created attachment 439160 [details]
0014a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

The patch has been modified to handle the NULL return value from index_index2prefix().
Comment 80 Endi Sukma Dewata 2010-08-17 12:51:29 EDT
Created attachment 439163 [details]
0021a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

The patch has been modified to return immediately when a NULL pointer error occurs.
Comment 81 Endi Sukma Dewata 2010-08-17 12:53:54 EDT
Created attachment 439164 [details]
0029a-Bug-613056-fix-coverify-Defect-Type-Null-pointer-der.patch

The destroy_task() has been modified to handle NULL task.
Comment 87 Noriko Hosoi 2010-08-20 14:56:13 EDT
On behalf of Endi (edewata@redhat.com), pushed to master.

$ git merge endi
Updating 634c7aa..10d4035
Fast-forward
 .../plugins/replication/windows_protocol_util.c    |   11 +++++-
 ldap/servers/plugins/retrocl/retrocl_po.c          |    7 +++-
 ldap/servers/plugins/roles/roles_cache.c           |    2 +-
 ldap/servers/plugins/statechange/statechange.c     |    7 ++--
 ldap/servers/plugins/syntaxes/value.c              |   26 +++++++++++++-
 ldap/servers/slapd/auth.c                          |   23 ++++++++-----
 ldap/servers/slapd/back-ldbm/archive.c             |    6 ++--
 ldap/servers/slapd/back-ldbm/dblayer.c             |   35 +++++++++++--------
 ldap/servers/slapd/back-ldbm/filterindex.c         |    6 +++-
 ldap/servers/slapd/back-ldbm/import.c              |    5 +++
 ldap/servers/slapd/back-ldbm/index.c               |   32 +++++++++++++++--
 ldap/servers/slapd/back-ldbm/ldbm_attr.c           |    7 ++++
 .../slapd/back-ldbm/ldbm_attrcrypt_config.c        |    2 +-
 ldap/servers/slapd/back-ldbm/ldbm_config.c         |    1 +
 ldap/servers/slapd/back-ldbm/ldif2ldbm.c           |    2 +-
 ldap/servers/slapd/back-ldbm/vlv_srch.c            |    2 +-
 ldap/servers/slapd/control.c                       |    7 +++-
 ldap/servers/slapd/dn.c                            |    5 +++
 ldap/servers/slapd/filter.c                        |    2 +-
 ldap/servers/slapd/main.c                          |   34 +++++++++++--------
 ldap/servers/slapd/mapping_tree.c                  |    8 ++--
 ldap/servers/slapd/plugin_internal_op.c            |    5 +++
 ldap/servers/slapd/plugin_syntax.c                 |   36 +++++++++----------
 ldap/servers/slapd/schema.c                        |    8 +++-
 ldap/servers/slapd/task.c                          |   15 +++++++-
 ldap/servers/slapd/tools/dbscan.c                  |    7 +++-
 ldap/servers/snmp/main.c                           |    4 ++
 27 files changed, 216 insertions(+), 89 deletions(-)

$ git push
Counting objects: 218, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (178/178), done.
Writing objects: 100% (178/178), 17.92 KiB, done.
Total 178 (delta 149), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   634c7aa..10d4035  master -> master
Comment 88 Amita Sharma 2011-05-13 02:57:50 EDT
Coverity Related, Can I request dev to please test this.

Note You need to log in before you can comment on or make changes to this bug.