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

strcasestr emulation returns invalid pointer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.4.6, 2.5.1
    • 2.4.6, 2.5.2
    • Internal Code
    • None
    • Affects Windows and Solaris only
    • Fully Compatible
    • Windows

    Description

      The emulated strcasestr() function in src/mongo/platform/strcasestr.cpp returns a pointer that points into freed memory rather than into the source string.

      In the current MongoDB code, this routine is only used during text search and the pointer is only compared with NULL, so there is no current problem resulting from this bug.

      If usage of the routine was expanded in the future, attempts to use the returned pointer could segfault or cause other errors.

      Attachments

        Activity

          People

            tad Tad Marshall
            tad Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: