[CDRIVER-896] Error messages sometimes truncated at 63 chars Created: 30/Sep/15  Updated: 10/Aug/16  Resolved: 18/Apr/16

Status: Closed
Project: C Driver
Component/s: errors, libbson
Affects Version/s: None
Fix Version/s: 1.4.0

Type: Bug Priority: Minor - P4
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_ERROR_BUFFER_SIZE is defined as 64, but it's used in a few places to format bson_error_t message strings, which can be 504 bytes (including nil).

Set it to the proper length and use it in the bson_error_t declaration. There's a static check in bson-types.h to ensure the lengths add up correctly:

BSON_STATIC_ASSERT (sizeof (bson_error_t) == 512);

Review calls to bson_set_error and use the macro everywhere appropriate.



 Comments   
Comment by Githook User [ 18/Apr/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-896 don't cut error msgs at 64 chars
Branch: master
https://github.com/mongodb/libbson/commit/82b3cb4d89fdb590cdda4d2bb591d0062ccc765e

Generated at Wed Feb 07 21:10:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.