[SERVER-6624] Read to invalid memory in Expression::parseOperand Created: 27/Jul/12  Updated: 11/Jul/16  Resolved: 27/Jul/12

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: 2.2.0-rc0
Fix Version/s: 2.2.0-rc1

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

            BSONElement opCopy(*pBsonElement);
            string value(opCopy.String());
 
            /* check for a field path */
            if (value[0] != '$')
                goto ExpectConstant;  // assume plain string constant

Does not work if the String is empty.



 Comments   
Comment by Mathias Stearn [ 27/Jul/12 ]

https://github.com/mongodb/mongo/commit/e2a134e3b19855af83cb381b48f56d6f7cca9c6c

Comment by Eric Milkie [ 27/Jul/12 ]

This bug was discovered by the Windows debug build

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