diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-10-06 18:20:40 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-10-06 18:20:40 +0000 |
commit | 92eb82325e8bddc56daa8dbd1308efd4896c6114 (patch) | |
tree | db36c092d2457451c43cf03ae53375077d405269 | |
parent | 59ef342beb1081f67a54b734cc267578ff75215b (diff) | |
download | ffmpeg-92eb82325e8bddc56daa8dbd1308efd4896c6114.tar.gz |
prevent >16bit tags to be truncated and used in creating .wav files
Originally committed as revision 6568 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/riff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c index 2ab1ec18a9..0b81f293bc 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -278,7 +278,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc) if(!enc->codec_tag || enc->codec_tag > 0xffff) enc->codec_tag = codec_get_tag(codec_wav_tags, enc->codec_id); - if(!enc->codec_tag) + if(!enc->codec_tag || enc->codec_tag > 0xffff) return -1; put_le16(pb, enc->codec_tag); |