summaryrefslogtreecommitdiff
path: root/src/mongo/idl/basic_types.idl
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2019-06-03 11:17:25 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2019-06-03 11:17:25 -0400
commit28000675e7cf1b6ab55a0aaa0fcb07a7f3c49512 (patch)
treed047a2fcf79285b4d2408d63f5f1704e9085e7f4 /src/mongo/idl/basic_types.idl
parent16a18a5370f276ca5ec91bfc13b2738390b319e8 (diff)
downloadmongo-28000675e7cf1b6ab55a0aaa0fcb07a7f3c49512.tar.gz
SERVER-41024 safeInt64 IDL types are not safe for all numerical inputs, results in UB
Diffstat (limited to 'src/mongo/idl/basic_types.idl')
-rw-r--r--src/mongo/idl/basic_types.idl12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mongo/idl/basic_types.idl b/src/mongo/idl/basic_types.idl
index e91ce1ec2b1..084ca20fe42 100644
--- a/src/mongo/idl/basic_types.idl
+++ b/src/mongo/idl/basic_types.idl
@@ -46,16 +46,6 @@ types:
cpp_type: "std::int32_t"
deserializer: "mongo::BSONElement::_numberInt"
- safeInt32:
- bson_serialization_type:
- - long
- - int
- - decimal
- - double
- description: "Accepts any numerical type within int32 range"
- cpp_type: std::int32_t
- deserializer: "mongo::BSONElement::numberInt"
-
safeInt64:
bson_serialization_type:
- long
@@ -64,7 +54,7 @@ types:
- double
description: "Accepts any numerical type within int64 range"
cpp_type: std::int64_t
- deserializer: "mongo::BSONElement::numberLong"
+ deserializer: "mongo::BSONElement::safeNumberLong"
long:
bson_serialization_type: long