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

Error messages sometimes truncated at 63 chars

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 1.4.0
    • None
    • errors, libbson
    • None

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: