Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-896

Error messages sometimes truncated at 63 chars

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.4.0
    • Affects Version/s: None
    • Component/s: errors, libbson
    • Labels:
      None

      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.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: