Lines Matching refs:data
31 bool WriteDataToFile(const char* data, size_t size, const char* filePath, bool isAppend = false)
43 ofs.write(data, size);
48 void FuzzApplyPatch(const uint8_t* data, size_t size)
50 FuzzedDataProvider fdp(data, size);
52 const char* bspatchPath = "/data/applyPatchfuzzBspatch";
53 const char* imgpatchPath = "/data/applyPatchfuzzImgpatch";
54 const char* oldFilePath = "/data/applyPatchfuzzOldFile";
55 const char* newFilePath = "/data/applyPatchfuzzNewFile";
57 bool ret = WriteDataToFile(reinterpret_cast<const char*>(data), size, oldFilePath);
61 ret &= WriteDataToFile(reinterpret_cast<const char*>(data), size, bspatchPath, true);
65 ret &= WriteDataToFile(reinterpret_cast<const char*>(data), size, imgpatchPath, true);
75 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
77 /* Run your code on data */
78 OHOS::FuzzApplyPatch(data, size);