1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-17 16:11:11 +02:00

Assert that sampleCount doesn't narrow converting to 3d party types

This commit is contained in:
Paul Licameli
2016-08-29 08:50:11 -04:00
parent 26b5e77050
commit 99dca62cff
4 changed files with 15 additions and 1 deletions

View File

@@ -190,6 +190,10 @@ int ODFlacDecoder::Decode(SampleBuffer & data, sampleFormat & format, sampleCoun
mTargetChannel=channel;
// Third party library has its own type alias, check it
static_assert(sizeof(sampleCount::type) <=
sizeof(FLAC__int64),
"Type FLAC__int64 is too narrow to hold a sampleCount");
if(!mFile->seek_absolute(start))
{
mFlacFileLock.Unlock();