Skip to content

Commit

Permalink
Fix uninit read Defect in SoundPosMap
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nico-abram committed Oct 24, 2022
1 parent 42c65a3 commit edd3f3c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/RageUtil/Sound/RageSoundPosMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit edd3f3c

Please sign in to comment.