From 91020ac4faa84ce1731eb5fd80b4e07b7f7331f7 Mon Sep 17 00:00:00 2001 From: Sepalani Date: Sun, 19 Nov 2023 01:17:46 +0400 Subject: BBA/HLE: Fix random PCAP file corruption Concurrency between RecvHandlePacket and SendFromDirectFIFO --- Source/Core/Common/PcapFile.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Core/Common/PcapFile.cpp') diff --git a/Source/Core/Common/PcapFile.cpp b/Source/Core/Common/PcapFile.cpp index 71fcdc9eee..0f248ce1b5 100644 --- a/Source/Core/Common/PcapFile.cpp +++ b/Source/Core/Common/PcapFile.cpp @@ -49,6 +49,7 @@ void PCAP::AddHeader(u32 link_type) m_fp->WriteBytes(&hdr, sizeof(hdr)); } +// Not thread-safe, concurrency between multiple calls to IOFile::WriteBytes. void PCAP::AddPacket(const u8* bytes, size_t size) { std::chrono::system_clock::time_point now(std::chrono::system_clock::now()); -- cgit v1.2.3