Browse Source

Fix memory disclosure in audio send code (valgrind)

pull/744/head
Tux3 / Mlkj / !Lev.uXFMLA 11 years ago
parent
commit
56b0559d85
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
  1. 1
      src/coreav.cpp

1
src/coreav.cpp

@ -657,6 +657,7 @@ void Core::sendGroupCallAudio(int groupId, ToxAv* toxav) @@ -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;
}

Loading…
Cancel
Save