From 307ca9481696cde7f53cc01567686f29d565259b Mon Sep 17 00:00:00 2001 From: zhangboyuan Date: Wed, 4 Jan 2023 15:56:34 +0800 Subject: [PATCH] =?UTF-8?q?fuzz=E7=94=A8=E4=BE=8B=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangboyuan --- .../fuzztest/core/bufferobject_fuzzer/bufferobject_fuzzer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipc/native/test/fuzztest/core/bufferobject_fuzzer/bufferobject_fuzzer.cpp b/ipc/native/test/fuzztest/core/bufferobject_fuzzer/bufferobject_fuzzer.cpp index 4c8babc..5ac4cf5 100644 --- a/ipc/native/test/fuzztest/core/bufferobject_fuzzer/bufferobject_fuzzer.cpp +++ b/ipc/native/test/fuzztest/core/bufferobject_fuzzer/bufferobject_fuzzer.cpp @@ -219,7 +219,7 @@ namespace OHOS { bool UpdateSendBufferTest(const uint8_t* data, size_t size) { - if (data == nullptr || size == 0) { + if (data == nullptr || size < sizeof(uint32_t)) { return false; } BufferObject object; -- GitLab