summaryrefslogtreecommitdiff
path: root/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp')
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp b/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp
index 0ef50e6..0c39b8a 100644
--- a/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp
+++ b/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp
@@ -608,11 +608,10 @@ bool WAVEBehavior::parseDS64Chunk( const Chunk& ds64Chunk, WAVEBehavior::DS64& d
memcpy( &ds64, data, kMinimumDS64ChunkSize );
// If there is more data but the table length is <= 0 then this is not a valid ds64 chunk
- if( size > kMinimumDS64ChunkSize && ds64.tableLength > 0 )
+ if (size > kMinimumDS64ChunkSize && ds64.tableLength > 0 && ((size - kMinimumDS64ChunkSize) >= (ds64.tableLength * sizeof(ChunkSize64))))
{
// copy chunk sizes table
//
- XMP_Assert( size - kMinimumDS64ChunkSize >= ds64.tableLength * sizeof(ChunkSize64));
XMP_Uns32 offset = kMinimumDS64ChunkSize;
ChunkSize64 chunkSize;