[SERVER-22438] Coverity analysis defect 77705: Dereference before null check Created: 02/Feb/16 Updated: 22/Nov/16 Resolved: 05/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | WiredTiger |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.4, 3.3.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Coverity Collector User | Assignee: | Donald Anderson |
| Resolution: | Done | Votes: | 0 |
| Labels: | code-only, coverity | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Completed: | |||||||||
| Participants: | |||||||||
| Description |
|
All paths that lead to this null pointer comparison already dereference the pointer earlier Defect 77705 (STATIC_C)
/src/third_party/wiredtiger/src/conn/conn_api.c, line: 445
|
| Comments |
| Comment by Githook User [ 24/Feb/16 ] |
|
Author: {u'name': u'Ramon Fernandez', u'email': u'ramon@mongodb.com'}Message: Import wiredtiger-wiredtiger-2.7.0-650-g5cdd3e3.tar.gz from wiredtiger branch mongodb-3.2 ref: 07966a4..5cdd3e3
|
| Comment by Githook User [ 18/Feb/16 ] |
|
Author: {u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith.bostic@mongodb.com'}Message: Merge pull request #2480 from wiredtiger/server-22438-coverity-encryption
|
| Comment by Githook User [ 18/Feb/16 ] |
|
Author: {u'username': u'ddanderson', u'name': u'Don Anderson', u'email': u'dda@ddanderson.com'}Message: |
| Comment by Githook User [ 11/Feb/16 ] |
|
Author: {u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith.bostic@mongodb.com'}Message: Merge pull request #2480 from wiredtiger/server-22438-coverity-encryption
|
| Comment by Githook User [ 11/Feb/16 ] |
|
Author: {u'username': u'ddanderson', u'name': u'Don Anderson', u'email': u'dda@ddanderson.com'}Message: |
| Comment by Githook User [ 04/Feb/16 ] |
|
Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'}Message: Import wiredtiger-wiredtiger-2.7.0-592-gcc96d99.tar.gz from wiredtiger branch mongodb-3.4 ref: 7fea169..cc96d99
|
| Comment by Githook User [ 03/Feb/16 ] |
|
Author: {u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith.bostic@mongodb.com'}Message: Merge pull request #2480 from wiredtiger/server-22438-coverity-encryption
|
| Comment by Githook User [ 03/Feb/16 ] |
|
Author: {u'username': u'ddanderson', u'name': u'Don Anderson', u'email': u'dda@ddanderson.com'}Message: |
| Comment by Donald Anderson [ 03/Feb/16 ] |
|
The 'encryptor' variable may be modified by the call to customize, so I think the warning is benign. That said, the code is not as clear as it could be and there's an unnecessary assignment. Pull request coming which should hopefully resolve the covert warning. |
| Comment by Keith Bostic (Inactive) [ 03/Feb/16 ] |
|
donald.anderson, can you please take a look at this one? The complaint seems correct (encryptor has been indirected through before the NULL test), but there's some complexity around the test I don't understand. The change went in here, no clue why Coverity suddenly noticed. |