mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 06:20:07 +00:00
update test/fuzztest/distributedschedstub_fuzzer/distributedschedstub_fuzzer.cpp.
Signed-off-by: 师皓杰 <shihaojie10@huawei.com>
This commit is contained in:
parent
ab7679479f
commit
d02ec23ff1
@ -42,6 +42,10 @@ const uint32_t ONE = 1;
|
||||
uint32_t GetU32Data(const uint8_t* ptr, size_t size)
|
||||
{
|
||||
char *ch = (char *)malloc(size + 1);
|
||||
if (ch == nullptr) {
|
||||
std::cout << "malloc failed." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
(void)memset_s(ch, size + 1, 0x00, size + 1);
|
||||
if (memcpy_s(ch, size + 1, ptr, size) != EOK) {
|
||||
std::cout << "copy failed." << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user