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

convertToCapped size is not checked for float -> long long overflow

    • Fully Compatible
    • ALL
    • v4.0, v3.6
    • Storage NYC 2018-05-21, Storage NYC 2018-06-04
    • 46

      convertToCapped parses the size field as a number. This double is later assigned to a long long.

      Normally the validation will fail, bubbling up to the user, when the collection options (now a BSON object) gets parsed into another CollectionOptions for creating the collection. But a pedantic compiler may generate a binary that catches something going wrong earlier (at the assignment itself).

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: