diff options
author | Oz Linden <oz@lindenlab.com> | 2011-01-24 11:44:43 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-01-24 11:44:43 -0500 |
commit | f57aa3e83f1b4286b1d6b5cc8bca20fb924cb002 (patch) | |
tree | 12dae11397876ce10d75eeabe5b1656ea18cd6ac /indra/llaudio/llvorbisencode.cpp | |
parent | b429ff8ec3e1aebc60ff7f4d3376cfc8b9f2e669 (diff) | |
parent | f9b9c7a5816cf0b9627a4a50e73a663667937145 (diff) |
merge changes for i18n fixes
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))) |