[CDRIVER-1043] bson_strnlen is off by one Created: 09/Dec/15 Updated: 18/Jan/16 Resolved: 09/Dec/15 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libbson |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
bson_strnlen returns strnlen if available, otherwise a custom implementation of strnlen. Ever since it was first written, bson_strnlen's custom implementation has returned a value 1 greater than strnlen. Furthermore, due to a misspelled ifdef ( This was undetected because: 1. bson_strnlen is not directly tested |
| Comments |
| Comment by Githook User [ 09/Dec/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: |