[SERVER-33105] Use-after-move in Helpers::findOne Created: 03/Feb/18  Updated: 29/Oct/23  Resolved: 08/Feb/18

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

Type: Bug Priority: Major - P3
Reporter: Ian Boros Assignee: Ian Boros
Resolution: Fixed 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 2018-02-12
Participants:
Linked BF Score: 0

 Description   

In this code, we call qr->asFindCommand().toString() after qr has been moved. This can result in a segfault.



 Comments   
Comment by Githook User [ 08/Feb/18 ]

Author:

{'email': 'ian.boros@10gen.com', 'name': 'Ian Boros'}

Message: SERVER-33105 Fix use-after-move bug in Helpers::findOne()
Branch: master
https://github.com/mongodb/mongo/commit/7a97a67879f171eb8bd6748c4a7e1bcd8f328490

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