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

strcasestr emulation returns invalid pointer

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.6, 2.5.2
    • Affects Version/s: 2.4.6, 2.5.1
    • Component/s: Internal Code
    • None
    • Environment:
      Affects Windows and Solaris only
    • Fully Compatible
    • Windows

      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.

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

              Created:
              Updated:
              Resolved: