From edd3f3c47c1651079b9e452403ce200567ac3051 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 23 Oct 2022 21:44:56 -0300 Subject: [PATCH] Fix uninit read Defect in SoundPosMap The `*this = cpy` statement calls the copy constructor, which does `delete m_pImpl` while the field is uninitialized. Just removing it should be fine, we allocate a copy of the m_pImpl anyways and that is the only field in the type. --- src/RageUtil/Sound/RageSoundPosMap.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/RageUtil/Sound/RageSoundPosMap.cpp b/src/RageUtil/Sound/RageSoundPosMap.cpp index 990aaabf9d..cbe9fe2335 100644 --- a/src/RageUtil/Sound/RageSoundPosMap.cpp +++ b/src/RageUtil/Sound/RageSoundPosMap.cpp @@ -45,7 +45,6 @@ pos_map_queue::~pos_map_queue() pos_map_queue::pos_map_queue(const pos_map_queue& cpy) { - *this = cpy; m_pImpl = new pos_map_impl(*cpy.m_pImpl); }