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

Fix potentially unsafe uses of firstElementFieldName()[0]

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There are several callsites (example) where we access the first element of firstElementFieldName without actually checking if it is in bounds. This happens primarily in parsing code.

      I haven't been able to reproduce a bug due to this locally, but at a minimum it is fragile, and we should fix it (ideally banning recurrences if we can!)

            Assignee:
            Unassigned Unassigned
            Reporter:
            alya.berciu@mongodb.com Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None