[SERVER-18143] Coverity analysis defect 72592: Argument cannot be negative Created: 20/Apr/15  Updated: 05/Feb/16  Resolved: 12/Jun/15

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: None
Fix Version/s: 3.1.5

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Kevin Albertson
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: RPL 5 06/26/16
Participants:

 Description   

A new defect has been detected and assigned to siyuan.zhou@10gen.com in Coverity Connect.
http://coverity.mongodb.com//sourcebrowser.htm?projectId=10001#mergedDefectId=72592
The defect was flagged by checker NEGATIVE_RETURNS in
file /src/mongo/db/exec/geo_near.cpp
function mongo::GeoNear2DSphereStage::DensityEstimator::buildIndexScan(mongo::OperationContext *, mongo::WorkingSet *, mongo::Collection *)
and this ticket was created by amalia.hawkins@10gen.com



 Comments   
Comment by Githook User [ 09/Jun/15 ]

Author:

{u'username': u'kevinAlbs', u'name': u'Kevin Albertson', u'email': u'kevin.albertson@10gen.com'}

Message: SERVER-18143 Add fasserts to geo near

Closes #977

Signed-off-by: Siyuan Zhou <siyuan.zhou@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/4a921ef2cc2ed313f5dd50c4e6a4580021bf8a9b

Comment by Amalia Hawkins [ 20/Apr/15 ]

Also see file /src/mongo/db/exec/geo_near.cpp function mongo::GeoNear2DSphereStage::nextInterval(OperationContext* txn, WorkingSet* workingSet, Collection* collection) for another occurrence where we don't check the return val of getFieldPosition(_s2Index, s2Field);

Generated at Thu Feb 08 03:46:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.