[MONGOCRYPT-26] mongocrypt_status_set requires null byte to be included in message_len Created: 09/Aug/19 Updated: 28/Oct/23 Resolved: 16/Oct/19 |
|
| Status: | Closed |
| Project: | Libmongocrypt |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.0-rc0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Shane Harvey | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
mongocrypt_status_set requires null byte to be included in message_len, eg in Python this code prints '12' instead of '123':
Other libmongocrypt functions (like mongocrypt_ctx_setopt_masterkey_aws) don't need the +1 for the null byte so I consider this a bug. |
| Comments |
| Comment by Githook User [ 16/Oct/19 ] |
|
Author: {'name': 'Kevin Albertson', 'username': 'kevinAlbs', 'email': 'kevin.albertson@mongodb.com'}Message: Also covers |
| Comment by Kevin Albertson [ 16/Aug/19 ] |
|
Though unfortunate, changing how mongocrypt_status_set interprets the length would be a breaking change. We'll better document that the length should include the null byte. |