Explorar o código

common/fs/file: Default initialize IOFile members

Prevents a potential uninitialized read vector in the move constructor.
Lioncash %!s(int64=5) %!d(string=hai) anos
pai
achega
019bc9f6b2
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/common/fs/file.h

+ 2 - 2
src/common/fs/file.h

@@ -441,8 +441,8 @@ public:
 
 private:
     std::filesystem::path file_path;
-    FileAccessMode file_access_mode;
-    FileType file_type;
+    FileAccessMode file_access_mode{};
+    FileType file_type{};
 
     std::FILE* file = nullptr;
 };