1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix memory disclosure in audio send code (valgrind)

This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-11-13 21:14:17 +01:00
parent 5eeae0e142
commit 56b0559d85
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -657,6 +657,7 @@ void Core::sendGroupCallAudio(int groupId, ToxAv* toxav)
alcGetIntegerv(alInDev, ALC_CAPTURE_SAMPLES, sizeof(samples), &samples);
if(samples >= framesize)
{
memset(buf, 0, framesize*2); // Avoid uninitialized values (Valgrind)
alcCaptureSamples(alInDev, buf, framesize);
frame = 1;
}