- changed status to resolved
Buffer over-read in Gb_Apu::reset
Issue #5
resolved
Line 126: memcpy( wave.wave, initial_wave, sizeof wave.wave );
sizeof wave.wave is 32 (line 70 of Gb_Oscs.h) but initial_wave is only 16 bytes long.
Comments (2)
-
repo owner -
repo owner Issue
#7was marked as a duplicate of this issue. - Log in to comment
gb: Fix read from uninit memory initializing wavetable.
Reported by James Burton, the
initial_wave
preset buffer is actually smaller than the destination so we used the wrong sizeof. I'm somewhat surprised the compiler didn't catch it here since it knows both sizes.Fixes issue
#5.→ <<cset 0f6ddc87f9ad>>