Operational Defect Database

BugZero found this defect 89 days ago.

MongoDB | 2582792

IDLParserContext constructor with only fieldName and predecessor forwards to wrong constructor

Last update date:

3/12/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

8.0.0-rc0

Description:

Info

IDLParserContext(StringData, IDLParserContext *) looks like it passes an extra boost::optional argument, which only happens to be valid because the IDLParserContext * can be coerced to a boolean and therefore used for apiStrict in the constructor that does accept two optionals. We should fix this to forward to the correct constructor, ideally by being consistent about the ordering of arguments in the constructors. https://github.com/10gen/mongo/blob/e510b35074a82f219028c54da8b8241ae9996b0c/src/mongo/idl/idl_parser.h#L310

Top User Comments

xgen-internal-githook commented on Tue, 12 Mar 2024 02:08:55 +0000: Author: {'name': 'mathisbessamdb', 'email': '91484595+mathisbessamdb@users.noreply.github.com', 'username': 'mathisbessamdb'} Message: SERVER-86862 IDLParserContext constructor with only fieldName and predecessor forwards to wrong constructor (#19365) GitOrigin-RevId: 0319a273d768557447178dc611208fe11ea12724 Branch: master https://github.com/mongodb/mongo/commit/bc80b087045794dcdff5a2e69417d83e4c7b8d40

Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Closed

Learn More

Search:

...