Bug 630094 - fix coverity Defect Type: Control flow issues
Summary: fix coverity Defect Type: Control flow issues
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Directory Server
Version: 1.2.6
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Nathan Kinder
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 639035
TreeView+ depends on / blocked
 
Reported: 2010-09-03 17:17 UTC by Nathan Kinder
Modified: 2015-01-04 23:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-17 14:08:49 UTC
Embargoed:


Attachments (Terms of Use)
Patch for cov#11818 (5.16 KB, patch)
2010-09-08 21:05 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff
Patch for cov#15451 (1.20 KB, patch)
2010-09-08 21:19 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff
Patch for cov#15452 (4.90 KB, patch)
2010-09-08 21:41 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff
Patch for cov#15453 (1.36 KB, patch)
2010-09-08 21:52 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff
Patch for cov#15454 (1.23 KB, patch)
2010-09-08 22:12 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff
Patch for cov#15455 (13.50 KB, patch)
2010-09-08 22:43 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff
Patch for cov#15456 (1.34 KB, patch)
2010-09-08 22:50 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff
Patch for cov#15457 (1.16 KB, patch)
2010-09-08 22:56 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff
Patch for cov#15458 (1.47 KB, patch)
2010-09-09 15:04 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff
Patch for cov#15459 (1.25 KB, patch)
2010-09-09 15:15 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff
Patch for cov#15520 (1.35 KB, patch)
2010-09-09 15:27 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff
Patch for cov#15581 (1.55 KB, patch)
2010-09-09 22:00 UTC, Nathan Kinder
nhosoi: review+
nkinder: review?
Details | Diff

Description Nathan Kinder 2010-09-03 17:17:44 UTC
fix coverity Defect Type: Memory - Control flow issues

Comment 2 Nathan Kinder 2010-09-08 21:05:29 UTC
Created attachment 446084 [details]
Patch for cov#11818

Comment 3 Nathan Kinder 2010-09-08 21:19:39 UTC
Created attachment 446087 [details]
Patch for cov#15451

Comment 4 Nathan Kinder 2010-09-08 21:41:29 UTC
Created attachment 446093 [details]
Patch for cov#15452

Comment 5 Nathan Kinder 2010-09-08 21:52:53 UTC
Created attachment 446094 [details]
Patch for cov#15453

Comment 6 Nathan Kinder 2010-09-08 22:12:53 UTC
Created attachment 446095 [details]
Patch for cov#15454

Comment 7 Nathan Kinder 2010-09-08 22:43:37 UTC
Created attachment 446098 [details]
Patch for cov#15455

Comment 8 Nathan Kinder 2010-09-08 22:50:01 UTC
Created attachment 446099 [details]
Patch for cov#15456

Comment 9 Nathan Kinder 2010-09-08 22:56:40 UTC
Created attachment 446101 [details]
Patch for cov#15457

Comment 10 Nathan Kinder 2010-09-09 15:04:18 UTC
Created attachment 446270 [details]
Patch for cov#15458

Comment 11 Nathan Kinder 2010-09-09 15:15:34 UTC
Created attachment 446273 [details]
Patch for cov#15459

Comment 12 Nathan Kinder 2010-09-09 15:27:19 UTC
Created attachment 446279 [details]
Patch for cov#15520

Comment 13 Noriko Hosoi 2010-09-09 20:32:58 UTC
Comment on attachment 446098 [details]
Patch for cov#15455

Let me ask you to confirm one thing since it's a bit hard to see on the diff...  The following checking still exists after "if ( argc > 1 )" clause, doesn't it?  With the assumption, I put '+'. :)

    196         if (!indexes) {
    197                 LDAPDebug(LDAP_DEBUG_ANY, "attr_index_config: Missing in        dex\n", 0, 0, 0);
    198                 goto done;
    199         }
    200

Comment 14 Nathan Kinder 2010-09-09 20:46:22 UTC
(In reply to comment #13)
> Comment on attachment 446098 [details]
> Patch for cov#15455
> 
> Let me ask you to confirm one thing since it's a bit hard to see on the diff...
>  The following checking still exists after "if ( argc > 1 )" clause, doesn't
> it?  With the assumption, I put '+'. :)
> 
>     196         if (!indexes) {
>     197                 LDAPDebug(LDAP_DEBUG_ANY, "attr_index_config: Missing
> in        dex\n", 0, 0, 0);
>     198                 goto done;
>     199         }
>     200

Yes, this check is still performed immediately after the "if (argc > 1)" block is finished.

Comment 15 Nathan Kinder 2010-09-09 20:54:17 UTC
Pushed patches to master.  Thanks to Noriko for her reviews!

Counting objects: 93, done.
Delta compression using 2 threads.
Compressing objects: 100% (75/75), done.
Writing objects: 100% (75/75), 9.79 KiB, done.
Total 75 (delta 53), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   07d7c89..660629d  master -> master

Comment 16 Nathan Kinder 2010-09-09 22:00:33 UTC
Created attachment 446382 [details]
Patch for cov#15581

Comment 17 Noriko Hosoi 2010-09-09 22:09:06 UTC
Comment on attachment 446382 [details]
Patch for cov#15581

Ah, I see...  Sorry, I also missed them when I reviewed the previous fix...

Comment 18 Nathan Kinder 2010-09-09 22:15:05 UTC
Pushed additional patch to master.  Thanks to Noriko for her review!

Counting objects: 19, done.
Delta compression using 2 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.29 KiB, done.
Total 11 (delta 8), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   660629d..b2799df  master -> master

Comment 19 Amita Sharma 2011-05-13 07:01:20 UTC
Coverity Related, Can I request Dev to test this.


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