summaryrefslogtreecommitdiff
path: root/indra/llaudio/llvorbisencode.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-11-05 16:17:54 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-11-05 16:17:54 -0400
commit7318214ed30f57fe04dd7828fffede949fee6245 (patch)
tree71f22a09fe50176e9b7664611f7ad3addc254ec9 /indra/llaudio/llvorbisencode.cpp
parentddff1c68f22fbee00178d223eaac382836dba5f7 (diff)
parent4a8066856756cc9153cfab398a9a9b277a9a5e5d (diff)
merge
Diffstat (limited to 'indra/llaudio/llvorbisencode.cpp')
-rw-r--r--indra/llaudio/llvorbisencode.cpp7
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)))