diff --git a/test/fuzztest/fileinfosharedmemory_fuzzer/fileinfosharedmemory_fuzzer.cpp b/test/fuzztest/fileinfosharedmemory_fuzzer/fileinfosharedmemory_fuzzer.cpp index 6e190ab6e8367d2134b4af6c142b9112284acb7d..d2321f46a684fba275a4757e9bbb3cbad9b8c9ce 100644 --- a/test/fuzztest/fileinfosharedmemory_fuzzer/fileinfosharedmemory_fuzzer.cpp +++ b/test/fuzztest/fileinfosharedmemory_fuzzer/fileinfosharedmemory_fuzzer.cpp @@ -101,16 +101,14 @@ bool WriteFileInfosFuzzTest(const uint8_t *data, size_t size) int pos = 0; int32_t mode = TypeCast(data, &pos); - int64_t sz = TypeCast(data + pos, &pos); int64_t mtime = TypeCast(data + pos, &pos); int len = (size - pos) >> 2; - std::string uri(*reinterpret_cast(data + pos), len); + std::string uri(std::string(*reinterpret_cast(data + pos), len)); std::string relativePath(*reinterpret_cast(data + pos + len), len); std::string fileName(*reinterpret_cast(data + pos + len + len), len); std::string mimeType(*reinterpret_cast(data + pos + len + len + len), len); FileInfo info(uri, relativePath, fileName, mode, mimeType); - info.size = sz; info.mtime = mtime; vector fileInfoVec; fileInfoVec.emplace_back(info);