[CDRIVER-1936] bson_init_from_json() and bson_new_from_json() when provided with an empty string do not set error while returning false Created: 25/Nov/16 Updated: 07/Jan/17 Resolved: 07/Jan/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | json, libbson |
| Affects Version/s: | None |
| Fix Version/s: | 1.6.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Arseny Vakhrushev | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
When called with an empty string, bson_init_from_json() and bson_new_from_json() do not set error leaving it uninitialized which produces inconsistency with the documentation and requires an extra check to be made on the calling side. Please refer to the following code snippet:
|
| Comments |
| Comment by Githook User [ 07/Jan/17 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: |
| Comment by A. Jesse Jiryu Davis [ 25/Nov/16 ] |
|
Thanks for the report! |