[MONGOCRYPT-212] `kms_request_get_canonical` can return NULL and lead to segfault Created: 29/Nov/19 Updated: 28/Oct/23 Resolved: 02/Dec/19 |
|
| Status: | Closed |
| Project: | Libmongocrypt |
| Component/s: | kms_message |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matt Broadstone | Assignee: | Matt Broadstone |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
This method can possibly return NULL (in our unit tests because we stub out the implementation with one that returns false), but the library does not check for that value before attempting to operate on the string a few lines down, leading to a segfault |
| Comments |
| Comment by Githook User [ 02/Dec/19 ] |
|
Author: {'name': 'Matt Broadstone', 'username': 'mbroadst', 'email': 'mbroadst@mongodb.com'}Message: This method can return `NULL`, so a null check is required in |
| Comment by Matt Broadstone [ 29/Nov/19 ] |
| Comment by Githook User [ 29/Nov/19 ] |
|
Author: {'email': 'mbroadst@mongodb.com', 'name': 'Matt Broadstone', 'username': 'mbroadst'}Message: This method can return `NULL`, so a null check is required in |