mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 04:01:36 +08:00
Coverity 1304849
This commit is contained in:
+1
@@ -114,6 +114,7 @@ public:
|
|||||||
struct stat sb;
|
struct stat sb;
|
||||||
if (stat(base_path.c_str(), &sb) != 0 || !S_ISDIR(sb.st_mode))
|
if (stat(base_path.c_str(), &sb) != 0 || !S_ISDIR(sb.st_mode))
|
||||||
{
|
{
|
||||||
|
// coverity[toctou]
|
||||||
rv = mkdir(base_path.c_str(), S_IRWXU | S_IRWXG | S_IRWXO);
|
rv = mkdir(base_path.c_str(), S_IRWXU | S_IRWXG | S_IRWXO);
|
||||||
}
|
}
|
||||||
if (rv >= 0 )
|
if (rv >= 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user