Home
last modified time | relevance | path

Searched refs:pFile (Results 1 – 22 of 22) sorted by relevance

/base/startup/init/test/fuzztest/mountallwithfstabfile_fuzzer/
Dmountallwithfstabfile_fuzzer.cpp24 FILE *pFile = nullptr; in FuzzMountAllWithFstabFile() local
25 pFile = fopen("fstab.test", "w+"); in FuzzMountAllWithFstabFile()
26 if (pFile == nullptr) { in FuzzMountAllWithFstabFile()
30 if (fwrite(data, 1, size, pFile) != size) { in FuzzMountAllWithFstabFile()
32 (void)fclose(pFile); in FuzzMountAllWithFstabFile()
35 (void)fclose(pFile); in FuzzMountAllWithFstabFile()
/base/startup/init/test/fuzztest/readfstabfromfile_fuzzer/
Dreadfstabfromfile_fuzzer.cpp24 FILE *pFile = nullptr; in FuzzReadFstabFromFile() local
25 pFile = fopen("fstab.test", "w+"); in FuzzReadFstabFromFile()
26 if (pFile == nullptr) { in FuzzReadFstabFromFile()
30 if (fwrite(data, 1, size, pFile) != size) { in FuzzReadFstabFromFile()
32 (void)fclose(pFile); in FuzzReadFstabFromFile()
35 (void)fclose(pFile); in FuzzReadFstabFromFile()
/base/startup/init/test/fuzztest/umountallwithfstabfile_fuzzer/
Dumountallwithfstabfile_fuzzer.cpp24 FILE *pFile = nullptr; in FuzzUmountAllWithFstabFile() local
25 pFile = fopen("fstab.test", "w+"); in FuzzUmountAllWithFstabFile()
26 if (pFile == nullptr) { in FuzzUmountAllWithFstabFile()
30 if (fwrite(data, 1, size, pFile) != size) { in FuzzUmountAllWithFstabFile()
32 (void)fclose(pFile); in FuzzUmountAllWithFstabFile()
35 (void)fclose(pFile); in FuzzUmountAllWithFstabFile()
/base/startup/init/test/fuzztest/releasefstab_fuzzer/
Dreleasefstab_fuzzer.cpp23 FILE *pFile = nullptr; in FuzzReleaseFstab() local
24 pFile = fopen("fstab.test", "w+"); in FuzzReleaseFstab()
25 if (pFile == nullptr) { in FuzzReleaseFstab()
29 if (fwrite(data, 1, size, pFile) != size) { in FuzzReleaseFstab()
31 (void)fclose(pFile); in FuzzReleaseFstab()
34 (void)fclose(pFile); in FuzzReleaseFstab()
/base/startup/init/test/fuzztest/mountallwithfstab_fuzzer/
Dmountallwithfstab_fuzzer.cpp23 FILE *pFile = nullptr; in FuzzMountAllWithFstab() local
24 pFile = fopen("fstab.test", "w+"); in FuzzMountAllWithFstab()
25 if (pFile == nullptr) { in FuzzMountAllWithFstab()
29 if (fwrite(data, 1, size, pFile) != size) { in FuzzMountAllWithFstab()
31 (void)fclose(pFile); in FuzzMountAllWithFstab()
34 (void)fclose(pFile); in FuzzMountAllWithFstab()
/base/startup/init/test/fuzztest/findfstabitemforpath_fuzzer/
Dfindfstabitemforpath_fuzzer.cpp25 FILE *pFile = nullptr; in FuzzFindFstabItemForPath() local
26 pFile = fopen("fstab.test", "w+"); in FuzzFindFstabItemForPath()
27 if (pFile == nullptr) { in FuzzFindFstabItemForPath()
31 if (fwrite(data, 1, size, pFile) != size) { in FuzzFindFstabItemForPath()
33 (void)fclose(pFile); in FuzzFindFstabItemForPath()
36 (void)fclose(pFile); in FuzzFindFstabItemForPath()
/base/startup/init/test/fuzztest/parsefstabperline_fuzzer/
Dparsefstabperline_fuzzer.cpp25 FILE *pFile = nullptr; in FuzzParseFstabPerLine() local
26 pFile = fopen("fstab.test", "w+"); in FuzzParseFstabPerLine()
27 if (pFile == nullptr) { in FuzzParseFstabPerLine()
31 if (fwrite(data, 1, size, pFile) != size) { in FuzzParseFstabPerLine()
33 (void)fclose(pFile); in FuzzParseFstabPerLine()
36 (void)fclose(pFile); in FuzzParseFstabPerLine()
/base/startup/init/test/fuzztest/findfstabitemformountpoint_fuzzer/
Dfindfstabitemformountpoint_fuzzer.cpp25 FILE *pFile = nullptr; in FuzzFindFstabItemForMountPoint() local
26 pFile = fopen("fstab.test", "w+"); in FuzzFindFstabItemForMountPoint()
27 if (pFile == nullptr) { in FuzzFindFstabItemForMountPoint()
31 if (fwrite(data, 1, size, pFile) != size) { in FuzzFindFstabItemForMountPoint()
33 (void)fclose(pFile); in FuzzFindFstabItemForMountPoint()
36 (void)fclose(pFile); in FuzzFindFstabItemForMountPoint()
/base/startup/init/test/fuzztest/mountoneitem_fuzzer/
Dmountoneitem_fuzzer.cpp25 FILE *pFile = nullptr; in FuzzMountOneItem() local
26 pFile = fopen("fstab.test", "w+"); in FuzzMountOneItem()
27 if (pFile == nullptr) { in FuzzMountOneItem()
31 if (fwrite(data, 1, size, pFile) != size) { in FuzzMountOneItem()
33 (void)fclose(pFile); in FuzzMountOneItem()
36 (void)fclose(pFile); in FuzzMountOneItem()
/base/startup/init/test/fuzztest/getblockdevicebyname_fuzzer/
Dgetblockdevicebyname_fuzzer.cpp25 FILE *pFile = nullptr; in FuzzGetBlockDeviceByName() local
26 pFile = fopen("fstab.test", "w+"); in FuzzGetBlockDeviceByName()
27 if (pFile == nullptr) { in FuzzGetBlockDeviceByName()
31 if (fwrite(data, 1, size, pFile) != size) { in FuzzGetBlockDeviceByName()
33 (void)fclose(pFile); in FuzzGetBlockDeviceByName()
36 (void)fclose(pFile); in FuzzGetBlockDeviceByName()
/base/startup/init/test/fuzztest/getblockdevicebymountpoint_fuzzer/
Dgetblockdevicebymountpoint_fuzzer.cpp24 FILE *pFile = nullptr; in FuzzGetBlockDeviceByMountPoint() local
25 pFile = fopen("fstab.test", "w+"); in FuzzGetBlockDeviceByMountPoint()
26 if (pFile == nullptr) { in FuzzGetBlockDeviceByMountPoint()
30 if (fwrite(data, 1, size, pFile) != size) { in FuzzGetBlockDeviceByMountPoint()
32 (void)fclose(pFile); in FuzzGetBlockDeviceByMountPoint()
35 (void)fclose(pFile); in FuzzGetBlockDeviceByMountPoint()
/base/update/updater/test/fuzztest/readfstabfromfile_fuzzer/
Dreadfstabfromfile_fuzzer.cpp32 FILE *pFile; in FuzzReadFstabFromFile() local
36 pFile = fopen("ReadFstabFromFile.txt", "w+"); in FuzzReadFstabFromFile()
37 if (pFile == nullptr) { in FuzzReadFstabFromFile()
42 (void)fwrite(data, 1, size, pFile); in FuzzReadFstabFromFile()
43 (void)fclose(pFile); in FuzzReadFstabFromFile()
/base/startup/init/test/fuzztest/readfileindir_fuzzer/
Dreadfileindir_fuzzer.cpp44 FILE *pFile = nullptr; in FuzzReadFileInDir() local
45 pFile = fopen("ReadFileInDir.test", "w+"); in FuzzReadFileInDir()
46 if (pFile == nullptr) { in FuzzReadFileInDir()
50 if (fwrite(data, 1, size, pFile) != size) { in FuzzReadFileInDir()
52 (void)fclose(pFile); in FuzzReadFileInDir()
55 (void)fclose(pFile); in FuzzReadFileInDir()
/base/telephony/sms_mms/frameworks/native/mms/src/
Dmms_buffer.cpp102 FILE *pFile = nullptr; in WriteBufferFromFile() local
118 pFile = fopen(realPath, "rb"); in WriteBufferFromFile()
119 if (pFile == nullptr) { in WriteBufferFromFile()
123 (void)fseek(pFile, 0, SEEK_END); in WriteBufferFromFile()
124 long fileLen = ftell(pFile); in WriteBufferFromFile()
126 (void)fclose(pFile); in WriteBufferFromFile()
136 (void)fclose(pFile); in WriteBufferFromFile()
140 (void)fseek(pFile, 0, SEEK_SET); in WriteBufferFromFile()
141 totolLength_ = fread(pduBuffer_.get(), 1, fileLen, pFile); in WriteBufferFromFile()
142 (void)fclose(pFile); in WriteBufferFromFile()
Dmms_body_part.cpp437 FILE *pFile = nullptr; in WriteBodyFromFile() local
452 pFile = fopen(realPath, "rb"); in WriteBodyFromFile()
453 if (pFile == nullptr) { in WriteBodyFromFile()
457 (void)fseek(pFile, 0, SEEK_END); in WriteBodyFromFile()
458 long fileLen = ftell(pFile); in WriteBodyFromFile()
460 (void)fclose(pFile); in WriteBodyFromFile()
469 (void)fclose(pFile); in WriteBodyFromFile()
474 (void)fseek(pFile, 0, SEEK_SET); in WriteBodyFromFile()
475 bodyLen_ = fread(pbodyPartBuffer_.get(), 1, fileLen, pFile); in WriteBodyFromFile()
476 (void)fclose(pFile); in WriteBodyFromFile()
/base/telephony/sms_mms/services/mms/
Dmms_network_client.cpp120 FILE *pFile = nullptr; in GetMmsPduFromFile() local
127 pFile = fopen(realPath, "rb"); in GetMmsPduFromFile()
128 if (pFile == nullptr) { in GetMmsPduFromFile()
133 (void)fseek(pFile, 0, SEEK_END); in GetMmsPduFromFile()
134 long fileLen = ftell(pFile); in GetMmsPduFromFile()
136 (void)fclose(pFile); in GetMmsPduFromFile()
143 (void)fclose(pFile); in GetMmsPduFromFile()
147 (void)fseek(pFile, 0, SEEK_SET); in GetMmsPduFromFile()
148 …int32_t totolLength = static_cast<int32_t>(fread(pduBuffer.get(), 1, CODE_BUFFER_MAX_SIZE, pFile)); in GetMmsPduFromFile()
150 (void)fclose(pFile); in GetMmsPduFromFile()
[all …]
/base/update/sys_installer/test/fuzztest/
Dsys_installer_fuzzer.cpp148 FILE *pFile; in FuzzStartUpdaterProc() local
154 pFile = fopen("updater.txt", "w+"); in FuzzStartUpdaterProc()
155 if (pFile == nullptr) { in FuzzStartUpdaterProc()
160 (void)fwrite(data, 1, size, pFile); in FuzzStartUpdaterProc()
161 (void)fclose(pFile); in FuzzStartUpdaterProc()
/base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/
DUpdaterStartUpdaterProc_fuzzer.cpp179 FILE *pFile; in FuzzStartUpdaterProc() local
185 pFile = fopen("updater.txt", "w+"); in FuzzStartUpdaterProc()
186 if (pFile == nullptr) { in FuzzStartUpdaterProc()
191 fwrite(data, 1, size, pFile); in FuzzStartUpdaterProc()
192 fclose(pFile); in FuzzStartUpdaterProc()
/base/update/updater/services/flow_update/update_bin/
Dbin_flow_update.cpp143 FILE *pFile = fopen(writePath.c_str(), "w+"); in GetDataWriter() local
144 if (pFile != nullptr) { in GetDataWriter()
146 fwrite(data, 1, sizeof(data), pFile); in GetDataWriter()
147 fclose(pFile); in GetDataWriter()
/base/update/updater/test/fuzztest/extractandexecutescript_fuzzer/
Dextractandexecutescript_fuzzer.cpp301 FILE *pFile; in FuzzExtractAndExecuteScript() local
315 pFile = fopen("test_script.us", "w+"); in FuzzExtractAndExecuteScript()
316 if (pFile == nullptr) { in FuzzExtractAndExecuteScript()
321 (void)fwrite(data, 1, size, pFile); in FuzzExtractAndExecuteScript()
322 (void)fclose(pFile); in FuzzExtractAndExecuteScript()
/base/telephony/sms_mms/test/unittest/
Dmms_msg_test.cpp879 FILE *pFile = nullptr; in WriteBufferToFile() local
880 pFile = fopen(strPathName.c_str(), "wb"); in WriteBufferToFile()
881 if (!pFile || buff == nullptr) { in WriteBufferToFile()
885 uint32_t fileLen = fwrite(buff.get(), len, 1, pFile); in WriteBufferToFile()
891 (void)fclose(pFile); in WriteBufferToFile()
/base/telephony/sms_mms/frameworks/js/napi/src/
Dnapi_mms.cpp1485 FILE *pFile = fopen(realPath, "rb"); in GetMmsPduFromFile() local
1486 if (pFile == nullptr) { in GetMmsPduFromFile()
1491 (void)fseek(pFile, 0, SEEK_END); in GetMmsPduFromFile()
1492 long fileLen = ftell(pFile); in GetMmsPduFromFile()
1494 (void)fclose(pFile); in GetMmsPduFromFile()
1501 (void)fclose(pFile); in GetMmsPduFromFile()
1505 (void)fseek(pFile, 0, SEEK_SET); in GetMmsPduFromFile()
1506 int32_t totolLength = static_cast<int32_t>(fread(pduBuffer.get(), 1, MMS_PDU_MAX_SIZE, pFile)); in GetMmsPduFromFile()
1514 (void)fclose(pFile); in GetMmsPduFromFile()
1732 FILE *pFile = fopen(realPath, "wb"); in WriteBufferToFile() local
[all …]