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

strcasestr emulation returns invalid pointer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.4.6, 2.5.1
    • Fix Version/s: 2.4.6, 2.5.2
    • Component/s: Internal Code
    • Labels:
      None
    • Environment:
      Affects Windows and Solaris only
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      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

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

              Dates

              Created:
              Updated:
              Resolved: