From bc773c745896aad28526110388466d9d534fa9d8 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 14 Sep 2021 11:36:23 -0400 Subject: [PATCH] TLV Reader error handling test should not read uninitialized data. (#9653) We should just zero the data out, so it's known-bad. --- src/lib/core/tests/TestCHIPTLV.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/core/tests/TestCHIPTLV.cpp b/src/lib/core/tests/TestCHIPTLV.cpp index 2715cee28293ea..f78d5945fd6030 100644 --- a/src/lib/core/tests/TestCHIPTLV.cpp +++ b/src/lib/core/tests/TestCHIPTLV.cpp @@ -3021,7 +3021,7 @@ void TestCHIPTLVReaderDup(nlTestSuite * inSuite) void TestCHIPTLVReaderErrorHandling(nlTestSuite * inSuite) { CHIP_ERROR err; - uint8_t buf[2048]; + uint8_t buf[2048] = { 0 }; TLVReader reader; reader.Init(buf);