-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MONGOCRYPT-767 Increase tag count field size to 32 bits for text search types #958
base: master
Are you sure you want to change the base?
Conversation
I opted to make |
@@ -196,14 +196,14 @@ static bool _mc_fle2_iev_v2_test_parse(_mc_fle2_iev_v2_test *test, bson_iter_t * | |||
ASSERT_OR_PRINT_MSG(!test->substr_tag_count, "Duplicate field 'substr_tag_count'"); | |||
ASSERT(BSON_ITER_HOLDS_INT32(iter) || BSON_ITER_HOLDS_INT64(iter)); | |||
int64_t value = bson_iter_as_int64(iter); | |||
ASSERT_OR_PRINT_MSG((value >= 0) && (value < 256), "Field 'substr_tag_count' must be 0..255"); | |||
test->substr_tag_count = (uint8_t)value; | |||
ASSERT_OR_PRINT_MSG((value >= 0) && (value < UINT32_MAX), "Field 'substr_tag_count' must be 0..2^32-1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a positive test with counts larger than 8-bit? You can generate one by printing the result of _mc_fle2_iev_v2_test_serialize_payload
on a _mc_fle2_iev_v2_test
object constructed from a JSON file without a payload
field. The metadata
fields can just be duplicated as many times as you need; we don't do checks beyond validity on them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -624,13 +636,13 @@ static inline uint32_t mc_FLE2IndexedEncryptedValueV2_serialized_length(const mc | |||
// fle_blob_subtype: 1 byte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? I still see uint8_t
on line 619.
No description provided.