Prevent nullptr access in checkCollectionOptions uassert

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • 155
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      This can be reproduced by running:

      db.runCommand(

      { create: 'view', viewOn: 'coll' }

      );

      db.runCommand({
      create: 'view',
      viewOn: 'coll',
      collation:

      { locale: 'en' }

      });

      The first command attempts to create a view, but it fails with the error code OptionNotSupportedOnView. The second command should fail with the same error code, but instead segfaults inside checkCollectionOptions while attempting to raise this uassert.

      Collation is deliberately represented as a nullptr when there have been no special collation options set.

      This can be fixed by checking for a nullptr before raising the uassert.

            Assignee:
            Jennifer Peshansky (Inactive)
            Reporter:
            Jennifer Peshansky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: