Browse Source

Added some defenses against parsing corrupted metadata blocks in WAV files

tags/2021-05-28
jules 9 years ago
parent
commit
f5324afd8b
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp

+ 4
- 1
modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp View File

@@ -656,7 +656,10 @@ namespace WavFileHelpers
if (infoLength > 0)
{
infoLength = jlimit ((int64) 0, infoLength, (int64) input.readInt());
infoLength = jmin (infoLength, (int64) input.readInt());
if (infoLength <= 0)
return;
for (int i = 0; i < numElementsInArray (types); ++i)
{


Loading…
Cancel
Save