-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
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.