summaryrefslogtreecommitdiffstats
path: root/ldap
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-07-09 20:54:52 -0500
committerNoriko Hosoi <nhosoi@redhat.com>2010-08-20 11:54:22 -0700
commit1dd2d7417e91c340ef26d5ae693bfd551e1d441f (patch)
tree3a727589264e158c18810b697cd9baf241f3c7b1 /ldap
parenta82d3eede0912a86842dc3f2ba18b0484f70485f (diff)
downloadds-1dd2d7417e91c340ef26d5ae693bfd551e1d441f.tar.gz
ds-1dd2d7417e91c340ef26d5ae693bfd551e1d441f.tar.xz
ds-1dd2d7417e91c340ef26d5ae693bfd551e1d441f.zip
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
https://bugzilla.redhat.com/show_bug.cgi?id=613056 Resolves: bug 613056 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939 description: Catch possible NULL pointer in display_index_item().
Diffstat (limited to 'ldap')
-rw-r--r--ldap/servers/slapd/tools/dbscan.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ldap/servers/slapd/tools/dbscan.c b/ldap/servers/slapd/tools/dbscan.c
index 69c693fc..dfe811e1 100644
--- a/ldap/servers/slapd/tools/dbscan.c
+++ b/ldap/servers/slapd/tools/dbscan.c
@@ -630,7 +630,12 @@ static void display_index_item(DBC *cursor, DBT *key, DBT *data,
exit(1);
}
- if (idl && idl->max == 0) {
+ if (idl == NULL) {
+ printf("\t(illegal idl)\n");
+ return;
+ }
+
+ if (idl->max == 0) {
/* allids; should not exist in the new idl world */
if ( allids_cnt == 0 && (display_mode & SHOWSUMMARY)) {
printf("The following index keys reached allids:\n");