Replace snprintf with string and ostringstream (#1649)
These uses are probably safe from a buffer overflow perspective but can cause data race issues in logging due to static buffers.
This commit is contained in:
@ -909,7 +909,7 @@ bool FdManager::CheckAllCache()
|
||||
}
|
||||
|
||||
// print head message
|
||||
S3FS_PRN_CACHE(fp, CACHEDBG_FMT_HEAD, S3fsLog::GetCurrentTime());
|
||||
S3FS_PRN_CACHE(fp, CACHEDBG_FMT_HEAD, S3fsLog::GetCurrentTime().c_str());
|
||||
|
||||
// Loop in directory of cache file's stats
|
||||
std::string top_path = CacheFileStat::GetCacheFileStatTopDir();
|
||||
|
||||
Reference in New Issue
Block a user