diff options
author | Monty Brandenberg <monty@lindenlab.com> | 2010-12-09 11:07:50 -0500 |
---|---|---|
committer | Monty Brandenberg <monty@lindenlab.com> | 2010-12-09 11:07:50 -0500 |
commit | b9cf73c29b4b87a391c78415e4c09c31b4ac045c (patch) | |
tree | d843f4e78bc6874001cb81fc993cc59d0a179a83 /indra/llaudio/llvorbisencode.cpp | |
parent | a59c43f1adff35107e59fdfc3016d4329324bbaf (diff) | |
parent | d9b4570883652d647c05083c18fac1a088efd6e2 (diff) |
merge from http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/llaudio/llvorbisencode.cpp')
-rw-r--r-- | indra/llaudio/llvorbisencode.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llaudio/llvorbisencode.cpp b/indra/llaudio/llvorbisencode.cpp index 9f479189d7..0e0c80a456 100644 --- a/indra/llaudio/llvorbisencode.cpp +++ b/indra/llaudio/llvorbisencode.cpp @@ -120,6 +120,13 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro + ((U32) wav_header[5] << 8) + wav_header[4]; + if (chunk_length > physical_file_size - file_pos - 4) + { + infile.close(); + error_msg = "SoundFileInvalidChunkSize"; + return(LLVORBISENC_CHUNK_SIZE_ERR); + } + // llinfos << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << llendl; if (!(strncmp((char *)&(wav_header[0]),"fmt ",4))) |