mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 19:58:59 +00:00
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.
This commit is contained in:
parent
f85cc3bf12
commit
09b3a42495
@ -279,6 +279,9 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AV_WL32(key, chunk_code);
|
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) {
|
if (avio_read(pb, value, chunk_size) != chunk_size) {
|
||||||
av_log(s, AV_LOG_WARNING,
|
av_log(s, AV_LOG_WARNING,
|
||||||
|
Loading…
Reference in New Issue
Block a user