Check frame length bounds and samplerate
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8294d09f7f
commit
03a8d373b7
|
@ -130,7 +130,8 @@ int32_t ALACDecoder::Init( void * inMagicCookie, uint32_t inMagicCookieSize )
|
|||
mConfig = theConfig;
|
||||
|
||||
RequireAction( mConfig.compatibleVersion <= kALACVersion, return kALAC_ParamError; );
|
||||
RequireAction( mConfig.frameLength > 0, return kALAC_ParamError; );
|
||||
RequireAction( mConfig.frameLength > 0 && mConfig.frameLength <= 16384, return kALAC_ParamError; );
|
||||
RequireAction( mConfig.sampleRate > 0 && mConfig.sampleRate <= 384000, return kALAC_ParamError; );
|
||||
|
||||
// allocate mix buffers
|
||||
mMixBufferU = (int32_t *) calloc( mConfig.frameLength * sizeof(int32_t), 1 );
|
||||
|
|
Loading…
Reference in a new issue