-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
While libmongoc can generally be trusted not to indicate an error without setting the bson_error_t struct, it's possible that an oversight could result in us calling phongo_throw_exception_from_bson_error_t() on an uninitialized bson_error_t, which will lead to a nonsense exception code and message.
A defensive measure would be to initialize bson_error_t values with {0} everywhere. This is the same approached used in libmongoc's own test suite.