Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-76352

Improve BSONElement constructor that allows you to optionally provide internal sizes

    • Type: Icon: Improvement Improvement
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Storage Execution
    • Execution Team 2024-04-29

      The BSONElement constructor that allows you to optionally provide fieldName and value sizes optionally using -1 are unsafe. They do not provide a buffer size parameter to make sure we do not read out-of-bounds for the provided input buffer.

      The API can be improved to provide other functions to calculate these sizes so we can also get rid of a bunch of unnecessary branching.

            Assignee:
            erin.liang@mongodb.com Erin Liang
            Reporter:
            henrik.edin@mongodb.com Henrik Edin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: