-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: JavaScript
-
Fully Compatible
-
ALL
-
Query 2020-09-07
A source buffer of statically unknown size is copied into a fixed-size destination buffer
Defect 114099 (STATIC_C)
Checker STRING_OVERFLOW (subcategory fixed_size_dest)
File: /src/mongo/scripting/mozjs/jsstringwrapper.cpp
Function mongo::mozjs::JSStringWrapper::JSStringWrapper(int)
/src/mongo/scripting/mozjs/jsstringwrapper.cpp, line: 47
You might overrun the 64-character fixed-size string "this->_buf" by copying the return value of "c_str" without checking the length.
strcpy(_buf, formatted.c_str());
- causes
-
SERVER-57206 Compiler warnings in JSStringWrapper::JSStringWrapper
- Closed
- related to
-
SERVER-57371 ItoA should be able to write to a user-supplied buffer
- Backlog