Fix error case memory bug in GetHostName() (#11544)
Summary: Fix the error handling in `GetHostName` for non EFAULT, non EINVAL error. Current handling will cause stack overflow when non null-terminated c style string is in `name`, e.g. ENAMETOOLONG, when the `name` buffer is not big enough and the host name is truncated. Pull Request resolved: https://github.com/facebook/rocksdb/pull/11544 Test Plan: ``` COMPILE_WITH_ASAN=1 make all check ``` Reviewed By: pdillinger Differential Revision: D46775799 Pulled By: jowlyzhang fbshipit-source-id: e0fc9400c50fe38bc1fd888b4fea5fe8706165bfoxigraph-main
parent
b421a8c21b
commit
66499780b2
Loading…
Reference in new issue