aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorBruce Dawson <brucedawson@chromium.org>2016-01-28 13:06:07 -0800
committerHendrik Leppkes <h.leppkes@gmail.com>2016-02-01 10:41:56 +0100
commit09b3a42495b43d1bfc5ed36d924b6223b0761f91 (patch)
tree0336c5434ceed3f4d7c77844c0cfdf3b9dafd66c /libavformat
parentf85cc3bf12236e974403667610b39b802b8651d6 (diff)
downloadandroid_external_ffmpeg-09b3a42495b43d1bfc5ed36d924b6223b0761f91.tar.gz
android_external_ffmpeg-09b3a42495b43d1bfc5ed36d924b6223b0761f91.tar.bz2
android_external_ffmpeg-09b3a42495b43d1bfc5ed36d924b6223b0761f91.zip
riffdec: Explicitly null-terminate array to work around VC++ bug
Due to this bug in VC++ 2015 Update 1: https://connect.microsoft.com/VisualStudio/feedback/details/2291638 the 'key' array in ff_read_riff_info() ends up being not null terminated which led to failures in a Chromium unit tests. Update 2 should have a fix, but until then it is important to avoid problems.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/riffdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index aa637b6fcf..d7b81a0d08 100644
--- a/libavformat/riffdec.c
+++ b/libavformat/riffdec.c
@@ -279,6 +279,9 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
}
AV_WL32(key, chunk_code);
+ // Work around VC++ 2015 Update 1 code-gen bug:
+ // https://connect.microsoft.com/VisualStudio/feedback/details/2291638
+ key[4] = 0;
if (avio_read(pb, value, chunk_size) != chunk_size) {
av_log(s, AV_LOG_WARNING,