|
In bson-timegm.c we've vendored in some intricate clockwork to convert struct tm to a UNIX timestamp, which we use when parsing ISO 8601 datetimes from Javascript and converting them to BSON datetimes.
Coverity has noticed that a particular routine, timesub, loops over an integer i, decrementing i with each loop, and it reads from a buffer at position i - 1, which seems like it could be equal to -1 in some scenarios. Coverity can't determine for certain whether this is a bug in our vendored code, and neither can I. What I can say for certain is that, due to how libbson uses timesub, i's starting position is always zero, so the loop in which i is used never actually executes.
|