-
Type: Improvement
-
Resolution: Fixed
-
Priority: Trivial - P5
-
Affects Version/s: None
-
Component/s: None
-
None
CDRIVER-2894 introduced three occurrences of the logic for calling isspace after checking the bounds of the argument, like:
c >= -1 && c <= 255 && isspace (c)
There are checks in libbson, once in libmongoc, and once in the common library. We should probably refactor this into one function, perhaps named isspace_safe either in bson-string.h or somewhere in common library.
Additionally, the check in common-b64.c checks with an unsigned char, making the comparison of -1 redundant and triggering an autological warning.
- is related to
-
CDRIVER-2894 Migrate Windows MongoDB 4.4/latest tests to Windows 10
- Closed