-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.16.0
-
Component/s: Build
-
None
-
Environment:clang compiler, any platform
Lines 288-290 of mongo-c-driver-1.16.0/src/common/common-b64.c:
for (i = 1; i < 256; ++i) {
ch = (unsigned char) i;
/* Whitespaces */
if (ch >= -1 && ch <= 255 && isspace (ch))
ch is unsigned; it's never not going to be greater than or equal to -1. Further, you're iterating in a loop from 1 to 255 in the first place; not sure where a -1 is going to sneak in there, frankly.