Quantcast
Channel: naudio Work Item Rss Feed
Viewing all articles
Browse latest Browse all 738

Edited Issue: heap corruption for MixerControl.GetControlDetails when MIXERCONTROL_CONTROLF_MULTIPLE flag is set. [16390]

$
0
0
According to msdn, the size of the MIXERCONTROLDETAILS.paDetails buffer should be:

(http://msdn.microsoft.com/en-us/library/dd757294(v=vs.85).aspx)
_For MIXERCONTROL_CONTROLF_MULTIPLE controls, the size of this buffer should be the product of the __cChannels, cMultipleItems and cbDetails__ members of the MIXERCONTROLDETAILS structure. For controls other than MIXERCONTROL_CONTROLF_MULTIPLE types, the size of this buffer is the product of the cChannels and cbDetails members of the MIXERCONTROLDETAILS structure._

But the buffer size is now calculated as: __mixerControlDetails.cbDetails * mixerControlDetails.cChannels__
This will make the mixerGetControlDetails method to write beyond the allocated memory, and thereby corrupting the heap.

Attached is a patch file that will calculate the buffer size correctly.

Viewing all articles
Browse latest Browse all 738

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>