Skip to content
Snippets Groups Projects
Commit ac5a5470 authored by andreykproductengine's avatar andreykproductengine
Browse files

MAINT-8958 Handle initDecode crash

parent e236da41
No related branches found
No related tags found
No related merge requests found
......@@ -265,9 +265,19 @@ BOOL LLVorbisDecodeState::initDecode()
mInFilep = NULL;
return FALSE;
}
mWAVBuffer.reserve(size_guess);
mWAVBuffer.resize(WAV_HEADER_SIZE);
try
{
mWAVBuffer.reserve(size_guess);
mWAVBuffer.resize(WAV_HEADER_SIZE);
}
catch (std::bad_alloc)
{
LL_WARNS("AudioEngine") << "Out of memory when trying to alloc buffer: " << size_guess << LL_ENDL;
delete mInFilep;
mInFilep = NULL;
return FALSE;
}
{
// write the .wav format header
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment