From 28d5258d84abff887cf392fb4d5a5f670dede3f9 Mon Sep 17 00:00:00 2001 From: Alex Loiko Date: Thu, 22 Jun 2017 11:33:41 +0200 Subject: [PATCH] Force value-initialization of array to avoid uninitialized values. An automatic undef checker noticed an error in the new audio_processing_fuzzer. An array was default-initialized, meaning its contents had indeterminate values. This array was later filtered for forbidden values, which happened or did not happen based on the uninitialized values. Hence the error. TBR=henrik.lundin@webrtc.org NOTRY=true Bug: 735718, webrtc:7820 Change-Id: Ib50a6f7a5f054472fef07a27d37e02cea432a8ca Reviewed-on: https://chromium-review.googlesource.com/544937 Commit-Queue: Alex Loiko Reviewed-by: Henrik Lundin Reviewed-by: Alex Loiko Cr-Commit-Position: refs/heads/master@{#18713} --- webrtc/test/fuzzers/audio_processing_fuzzer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/test/fuzzers/audio_processing_fuzzer.cc b/webrtc/test/fuzzers/audio_processing_fuzzer.cc index d5a3bea0a1..389ab1c1b5 100644 --- a/webrtc/test/fuzzers/audio_processing_fuzzer.cc +++ b/webrtc/test/fuzzers/audio_processing_fuzzer.cc @@ -58,7 +58,7 @@ void FuzzAudioProcessing(const uint8_t* data, bool is_float, AudioProcessing* apm) { AudioFrame fixed_frame; - std::array float_frame; + std::array float_frame{}; float* const first_channel = &float_frame[0]; while (size > 0) {