mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-30 04:41:49 +00:00
c2dc4c0c52
Summary: `GetWindowsErrSz` may assign a `nullptr` to `std::string` in the event it cannot format the error code to a string. This will result in a crash when `std::string` attempts to calculate the length from `nullptr`. The change here checks the output from `FormatMessageA` and only assigns to the otuput `std::string` if it is not null. Additionally, the call to free the buffer is only made if a non-null value is returned from `FormatMessageA`. In the event `FormatMessageA` does not output a string, an empty string is returned instead. Fixes https://github.com/facebook/rocksdb/issues/10274 Pull Request resolved: https://github.com/facebook/rocksdb/pull/10282 Reviewed By: riversand963 Differential Revision: D37542143 Pulled By: ajkr fbshipit-source-id: c21f5119ddb451f76960acec94639d0f538052f2 |
||
---|---|---|
.. | ||
win | ||
jemalloc_helper.h | ||
lang.h | ||
likely.h | ||
malloc.h | ||
port.h | ||
port_dirent.h | ||
port_example.h | ||
port_posix.cc | ||
port_posix.h | ||
README | ||
stack_trace.cc | ||
stack_trace.h | ||
sys_time.h | ||
util_logger.h | ||
xpress.h |
This directory contains interfaces and implementations that isolate the rest of the package from platform details. Code in the rest of the package includes "port.h" from this directory. "port.h" in turn includes a platform specific "port_<platform>.h" file that provides the platform specific implementation. See port_posix.h for an example of what must be provided in a platform specific header file.