[MONGOCRYPT-430] FLE2: Unexpected queryType crash whole process Created: 18/May/22  Updated: 28/Oct/23  Resolved: 19/May/22

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Unknown
Reporter: Dmitry Lukyanov (Inactive) Assignee: Colby Pike
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Setting an arbitrary queryType like QueryType=0 crash the whole app process with the error similar to:

The active test run was aborted. Reason: Test host process crashed : c:\data\mci\bdae390c7e9db4405009f11458fd4b87\libmongocrypt\src\mongocrypt-marking.c:811 _mongocrypt_marking_to_ciphertext(): precondition failed: marking->fle2.type == MONGOCRYPT_FLE2_PLACEHOLDER_TYPE_FIND

We should be more robust to unexpected queryType.



 Comments   
Comment by Githook User [ 19/May/22 ]

Author:

{'name': 'vector-of-bool', 'email': 'vectorofbool@gmail.com', 'username': 'vector-of-bool'}

Message: Ensure we handle all enums in a switch and have a default case (#340)

Fixes MONGOCRYPT-430
Branch: master
https://github.com/mongodb/libmongocrypt/commit/a793e050300303408451bc5abf00fa694cc083ea

Generated at Thu Feb 08 09:08:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.