MCPcopy Create free account
hub / github.com/HexHive/NASS / writeFileDescriptor

Method writeFileDescriptor

fans/fuzzer-engine/fuzzer/src/parcel_writer.cpp:228–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226 FUZZER_LOGD("Generate CString: %s.", value.c_str());
227}
228void ParcelWriter::writeFileDescriptor() {
229 if (isRaw) {
230 FUZZER_LOGE("This operation shouldn't exist in raw mode.");
231 exit(0);
232 } else if (parcelReaderWriter->flattenableLevel > 0) {
233 // just count the number of FileDescriptors, do not write.
234 parcelReaderWriter->fdCount += 1;
235 FUZZER_LOGD("Count file descriptor: %u.", parcelReaderWriter->fdCount);
236 } else {
237 FDType fdType(varName, varType);
238 int32_t fd = generate(&fdType);
239 bool takeOwnership = variable["takeOwnership"].asBool();
240 parcelReaderWriter->data->writeFileDescriptor(fd, takeOwnership);
241 FUZZER_LOGD("Generate file descriptor: %u.", fd);
242 }
243}
244
245void ParcelWriter::writeStrongBinder() {
246 BinderType binderType(varName, varType, variable["interfaceName"].asString());

Callers 3

readFileDescriptorMethod · 0.45
generateMethod · 0.45
__write_to_parcelFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected