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 <aleloi@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Reviewed-by: Alex Loiko <aleloi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#18713}
This commit is contained in:
parent
300ec8c8db
commit
28d5258d84
@ -58,7 +58,7 @@ void FuzzAudioProcessing(const uint8_t* data,
|
||||
bool is_float,
|
||||
AudioProcessing* apm) {
|
||||
AudioFrame fixed_frame;
|
||||
std::array<float, 480> float_frame;
|
||||
std::array<float, 480> float_frame{};
|
||||
float* const first_channel = &float_frame[0];
|
||||
|
||||
while (size > 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user