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

Remove malloc for Decimal128 conversion during BSON->JSON

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Since bson_decimal128_from_string () requires a null terminated string, the BSON to JSON conversion for bson_decimal128_t allocates a new string+1 since the input isn't null terminated.

      We should be able to avoid that extra malloc, either though stack allocation or passing the length to the bson_decimal128_from_string () function.

            Assignee:
            fiona.rowan@mongodb.com Fiona Rowan
            Reporter:
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: