[SERVER-28826] Limit parsing in cluster geoNear performs unsafe conversion to int Created: 17/Apr/17  Updated: 12/Oct/17  Resolved: 17/Apr/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.5.7

Type: Bug Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Tess Avitabile (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2017-05-08
Participants:
Linked BF Score: 0

 Description   

Limit parsing in cluster geoNear calls BSONElement::numberInt() here. This can result in undefined behavior, since all that is known about the BSONElement is that it is a number. Instead we should call BSONElement::safeNumberLong(), like in geoNear limit parsing in mongod here.



 Comments   
Comment by Githook User [ 17/Apr/17 ]

Author:

{u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}

Message: SERVER-28826 Limit parsing in cluster geoNear should not perform unsafe conversion to int
Branch: master
https://github.com/mongodb/mongo/commit/4d2c6318608c22869b0655058431b37741822263

Generated at Thu Feb 08 04:19:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.