BugZero found this defect 20 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
4/29/2024
MongoDB Server
No affected releases provided.
No fixed releases provided.
IDL binds integer literals parsed from validator expressions which are greater than 2^31-1 to floating-point expressions rather than integer expressions, even though C++ literals can be greater than 32 bits. This can result in generating validators that perform comparisons between floating points and integers, which maybe imprecise. e.g. the following field foo: type: long validator: { gte: 2147483647 } generates the following validator: void Ping::validateBlah(IDLParserContext& ctxt, const std::int64_t value) { if (!(value >= 2147483748.0)) { throwComparisonError(ctxt, "blah", ">="_sd, value, 2147483748.0); } }