diff options
| author | Oz Linden <oz@lindenlab.com> | 2010-11-08 16:47:46 -0500 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2010-11-08 16:47:46 -0500 |
| commit | b657516f72f016a918e0ff627105dd380a94394c (patch) | |
| tree | 7d30ace2d3cba42c5f7de1c3dd23748e31b2803f /indra/llaudio/llvorbisencode.cpp | |
| parent | 451d115c1009ded2b2d74efefbe0611c62343eed (diff) | |
| parent | c446062bd3bd3f172b20f22f2086cea962fb7278 (diff) | |
pull beta changes back to 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))) |
