• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "imscallback_fuzzer.h"
17 
18 #include <cstddef>
19 #include <cstdint>
20 #define private public
21 #include "addcellularcalltoken_fuzzer.h"
22 #include "cellular_call_service.h"
23 #include "ims_call_callback_stub.h"
24 #include "ims_call_client.h"
25 #include "ims_call_proxy.h"
26 #include "securec.h"
27 #include "system_ability_definition.h"
28 #include "telephony_types.h"
29 
30 using namespace OHOS::Telephony;
31 namespace OHOS {
32 static bool g_isInited = false;
33 constexpr int32_t SERVICE_STATE_RUNNING = 1;
34 constexpr int32_t SLOT_NUM = 2;
35 constexpr int32_t BOOL_NUM = 2;
36 constexpr int32_t SERIAL_NUM = 3;
37 constexpr int32_t ERROR_NUM = 15;
38 constexpr int32_t TYPE_NUM = 5;
39 constexpr int32_t CALL_INDEX_NUM = 8;
40 constexpr int32_t REQUEST_NUM = 6;
41 constexpr int32_t VIDEO_CALL_EVENT_NUM = 4;
42 
IsServiceInited()43 bool IsServiceInited()
44 {
45     auto service = DelayedSingleton<CellularCallService>::GetInstance();
46     if (service == nullptr) {
47         return g_isInited;
48     }
49     if (service->GetServiceRunningState() != SERVICE_STATE_RUNNING) {
50         service->OnStart();
51     }
52     if (!g_isInited && service->GetServiceRunningState() == SERVICE_STATE_RUNNING) {
53         g_isInited = true;
54     }
55     return g_isInited;
56 }
57 
OnRemoteRequest(const uint8_t * data,size_t size)58 void OnRemoteRequest(const uint8_t *data, size_t size)
59 {
60     MessageParcel dataMessageParcel;
61     if (!dataMessageParcel.WriteInterfaceToken(ImsCallCallbackStub::GetDescriptor())) {
62         return;
63     }
64     int32_t slotId = ERROR_NUM;
65     dataMessageParcel.WriteInt32(slotId);
66     uint32_t code = static_cast<uint32_t>(size);
67     MessageParcel reply;
68     MessageOption option;
69     DelayedSingleton<ImsCallCallbackStub>::GetInstance()->OnRemoteRequest(code, dataMessageParcel, reply, option);
70 }
71 
TestImsCallCallbackFunction(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)72 void TestImsCallCallbackFunction(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
73 {
74     int32_t slotId = ERROR_NUM;
75     HRilRadioResponseInfo rilRadioResponse;
76     rilRadioResponse.flag = static_cast<int32_t>(size % BOOL_NUM);
77     rilRadioResponse.serial = static_cast<int32_t>(size % SERIAL_NUM);
78     rilRadioResponse.error = static_cast<HRilErrType>(size % ERROR_NUM);
79     rilRadioResponse.type = static_cast<HRilResponseTypes>(size % TYPE_NUM);
80     MessageParcel answerData;
81     MessageParcel answerReply;
82     answerData.WriteInt32(slotId);
83     stub->OnAnswerResponseInner(answerData, answerReply);
84 
85     MessageParcel dialData;
86     MessageParcel dialReply;
87     dialData.WriteInt32(slotId);
88     stub->OnDialResponseInner(dialData, dialReply);
89 
90     MessageParcel hangupData;
91     MessageParcel hangupReply;
92     hangupData.WriteInt32(slotId);
93     stub->OnHangUpResponseInner(hangupData, hangupReply);
94 
95     MessageParcel rejectData;
96     MessageParcel rejectReply;
97     rejectData.WriteInt32(slotId);
98     stub->OnRejectResponseInner(rejectData, rejectReply);
99 
100     MessageParcel sendDtmfData;
101     MessageParcel sendDtmfReply;
102     sendDtmfData.WriteInt32(slotId);
103     sendDtmfData.WriteRawData((const void *)&rilRadioResponse, sizeof(HRilRadioResponseInfo));
104     stub->OnSendDtmfResponseInner(sendDtmfData, sendDtmfReply);
105 
106     MessageParcel startDtmfData;
107     MessageParcel startDtmfReply;
108     startDtmfData.WriteInt32(slotId);
109     startDtmfData.WriteRawData((const void *)&rilRadioResponse, sizeof(HRilRadioResponseInfo));
110     stub->OnStartDtmfResponseInner(startDtmfData, startDtmfReply);
111 
112     MessageParcel stopDtmfData;
113     MessageParcel stopDtmfReply;
114     stopDtmfData.WriteInt32(slotId);
115     stopDtmfData.WriteRawData((const void *)&rilRadioResponse, sizeof(HRilRadioResponseInfo));
116     stub->OnStopDtmfResponseInner(stopDtmfData, stopDtmfReply);
117 
118     MessageParcel imsCallsData;
119     MessageParcel imsCallsReply;
120     slotId = ERROR_NUM;
121     imsCallsData.WriteInt32(slotId);
122     imsCallsData.WriteRawData((const void *)&rilRadioResponse, sizeof(HRilRadioResponseInfo));
123     stub->OnGetImsCallsDataResponseInner(imsCallsData, imsCallsReply);
124 }
125 
TestImsCallCallbackExFunction(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)126 void TestImsCallCallbackExFunction(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
127 {
128     int32_t slotId = ERROR_NUM;
129     std::string number(reinterpret_cast<const char *>(data), size);
130     MessageParcel muteData;
131     MessageParcel muteReply;
132     MuteControlResponse muteResponse;
133     muteResponse.result = static_cast<int32_t>(size % BOOL_NUM);
134     muteResponse.value = static_cast<int32_t>(size % BOOL_NUM);
135     muteData.WriteInt32(slotId);
136     muteData.WriteRawData((const void *)&muteResponse, sizeof(MuteControlResponse));
137     stub->OnSetMuteResponseInner(muteData, muteReply);
138 
139     MessageParcel ringData;
140     MessageParcel ringReply;
141     RingbackVoice ringback;
142     ringback.status = static_cast<int32_t>(size % BOOL_NUM);
143     ringData.WriteInt32(slotId);
144     ringData.WriteRawData((const void *)&ringback, sizeof(RingbackVoice));
145     stub->OnCallRingBackReportInner(ringData, ringReply);
146 
147     MessageParcel callData;
148     MessageParcel callReply;
149     callData.WriteInt32(slotId);
150     stub->OnCallStateChangeReportInner(callData, callReply);
151 
152     MessageParcel failData;
153     MessageParcel failReply;
154     DisconnectedDetails details;
155     details.reason = static_cast<DisconnectedReason>(size);
156     details.message = number;
157     slotId = ERROR_NUM;
158     failData.WriteInt32(slotId);
159     failData.WriteInt32(static_cast<int32_t>(details.reason));
160     failData.WriteString(details.message);
161     stub->OnLastCallFailReasonResponseInner(failData, failReply);
162 }
163 
TestImsConfigCallbackFunction(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)164 void TestImsConfigCallbackFunction(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
165 {
166     int32_t slotId = ERROR_NUM;
167     HRilRadioResponseInfo rilRadioResponse;
168     rilRadioResponse.flag = static_cast<int32_t>(size % BOOL_NUM);
169     rilRadioResponse.serial = static_cast<int32_t>(size % SERIAL_NUM);
170     rilRadioResponse.error = static_cast<HRilErrType>(size % ERROR_NUM);
171     rilRadioResponse.type = static_cast<HRilResponseTypes>(size % TYPE_NUM);
172 
173     MessageParcel setImsSwitchData;
174     MessageParcel setImsSwitchReply;
175     setImsSwitchData.WriteInt32(slotId);
176     setImsSwitchData.WriteRawData((const void *)&rilRadioResponse, sizeof(HRilRadioResponseInfo));
177     stub->OnSetImsSwitchResponseInner(setImsSwitchData, setImsSwitchReply);
178 
179     MessageParcel holdCallData;
180     MessageParcel holdCallReply;
181     holdCallData.WriteInt32(slotId);
182     stub->OnHoldCallResponseInner(holdCallData, holdCallReply);
183 
184     MessageParcel switchCallData;
185     MessageParcel switchCallReply;
186     switchCallData.WriteInt32(slotId);
187     stub->OnSwitchCallResponseInner(switchCallData, switchCallReply);
188 
189     MessageParcel unholdData;
190     MessageParcel unholdReply;
191     unholdData.WriteInt32(slotId);
192     stub->OnUnHoldCallResponseInner(unholdData, unholdReply);
193 
194     MessageParcel getImsSwitchData;
195     MessageParcel getImsSwitchReply;
196     getImsSwitchData.WriteInt32(slotId);
197     getImsSwitchData.WriteRawData((const void *)&rilRadioResponse, sizeof(HRilRadioResponseInfo));
198     stub->OnGetImsSwitchResponseInner(getImsSwitchData, getImsSwitchReply);
199 }
200 
WriteSsResult(MessageParcel & in,SsBaseResult & ssResult,const int32_t action,const int32_t state,size_t size)201 void WriteSsResult(MessageParcel &in, SsBaseResult &ssResult, const int32_t action, const int32_t state, size_t size)
202 {
203     ssResult.index = static_cast<int32_t>(size % SERIAL_NUM);
204     ssResult.result = static_cast<int32_t>(size % BOOL_NUM);
205     ssResult.reason = static_cast<int32_t>(size);
206     in.WriteInt32(ssResult.index);
207     in.WriteInt32(ssResult.result);
208     in.WriteInt32(ssResult.reason);
209     in.WriteString(ssResult.message);
210     in.WriteInt32(action);
211     in.WriteInt32(state);
212 }
213 
TestImsUTCallbackFunction(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)214 void TestImsUTCallbackFunction(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
215 {
216     int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
217     std::string number(reinterpret_cast<const char *>(data), size);
218 
219     SsBaseResult normalResult;
220     normalResult.index = static_cast<int32_t>(size % SERIAL_NUM);
221     normalResult.result = static_cast<int32_t>(size % BOOL_NUM);
222     normalResult.reason = static_cast<int32_t>(size);
223     normalResult.message = number;
224 
225     MessageParcel mData;
226     MessageParcel mReply;
227     mData.WriteInt32(slotId);
228     mData.WriteInt32(normalResult.index);
229     mData.WriteInt32(normalResult.result);
230     mData.WriteInt32(normalResult.reason);
231     mData.WriteString(normalResult.message);
232     stub->OnSetCallRestrictionResponseInner(mData, mReply);
233     stub->OnSetCallTransferResponseInner(mData, mReply);
234     stub->OnSetCallWaitingResponseInner(mData, mReply);
235     stub->OnSetClipResponseInner(mData, mReply);
236     stub->OnSetClirResponseInner(mData, mReply);
237     stub->OnSetColpResponseInner(mData, mReply);
238     stub->OnSetColrResponseInner(mData, mReply);
239 
240     MessageParcel crData;
241     MessageParcel crReply;
242     CallRestrictionResult crResult;
243     crResult.result.message = number;
244     crResult.status = static_cast<int32_t>(size % BOOL_NUM);
245     crResult.classCw = static_cast<int32_t>(size);
246     crData.WriteInt32(slotId);
247     WriteSsResult(crData, crResult.result, crResult.status, crResult.classCw, size);
248     stub->OnGetCallRestrictionResponseInner(crData, crReply);
249 
250     MessageParcel cwData;
251     MessageParcel cwReply;
252     CallWaitResult cwResult;
253     cwResult.result.message = number;
254     cwResult.status = static_cast<int32_t>(size % BOOL_NUM);
255     cwResult.classCw = static_cast<int32_t>(size);
256     cwData.WriteInt32(slotId);
257     WriteSsResult(cwData, cwResult.result, cwResult.status, cwResult.classCw, size);
258     stub->OnGetCallWaitingResponseInner(cwData, cwReply);
259 
260     MessageParcel clipData;
261     MessageParcel clipReply;
262     GetClipResult clipResult;
263     clipResult.result.message = number;
264     clipResult.clipStat = static_cast<int32_t>(size);
265     clipResult.action = static_cast<int32_t>(size);
266     clipData.WriteInt32(slotId);
267     WriteSsResult(clipData, clipResult.result, clipResult.action, clipResult.clipStat, size);
268     stub->OnGetClipResponseInner(clipData, clipReply);
269 }
270 
TestUTCallbackFunction(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)271 void TestUTCallbackFunction(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
272 {
273     int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
274     std::string number(reinterpret_cast<const char *>(data), size);
275 
276     MessageParcel clirData;
277     MessageParcel clirReply;
278     GetClirResult clirResult;
279     clirResult.result.message = number;
280     clirResult.clirStat = static_cast<int32_t>(size);
281     clirResult.action = static_cast<int32_t>(size);
282     clirData.WriteInt32(slotId);
283     WriteSsResult(clirData, clirResult.result, clirResult.action, clirResult.clirStat, size);
284     stub->OnGetClirResponseInner(clirData, clirReply);
285 
286     MessageParcel colpData;
287     MessageParcel colpReply;
288     GetColpResult colpResult;
289     colpResult.result.message = number;
290     colpResult.colpStat = static_cast<int32_t>(size);
291     colpResult.action = static_cast<int32_t>(size);
292     colpData.WriteInt32(slotId);
293     WriteSsResult(colpData, colpResult.result, colpResult.action, colpResult.colpStat, size);
294     stub->OnGetColpResponseInner(colpData, colpReply);
295 
296     MessageParcel colrData;
297     MessageParcel colrReply;
298     GetColrResult colrResult;
299     colrResult.result.message = number;
300     colrResult.colrStat = static_cast<int32_t>(size);
301     colrResult.action = static_cast<int32_t>(size);
302     colrData.WriteInt32(slotId);
303     WriteSsResult(colrData, colrResult.result, colrResult.action, colrResult.colrStat, size);
304     stub->OnGetColrResponseInner(colrData, colrReply);
305 }
306 
TestCFCallbackFunction(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)307 void TestCFCallbackFunction(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
308 {
309     int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
310     std::string number(reinterpret_cast<const char *>(data), size);
311     MessageParcel cfData;
312     MessageParcel cfReply;
313     SsBaseResult normalResult;
314     CallForwardQueryResult cfCall;
315     normalResult.message = number;
316     int32_t callSize = 1;
317     int32_t flag = static_cast<int32_t>(size % BOOL_NUM);
318     cfCall.serial = static_cast<int32_t>(size % SERIAL_NUM);
319     cfCall.result = static_cast<int32_t>(size % BOOL_NUM);
320     cfCall.status = static_cast<int32_t>(size % BOOL_NUM);
321     cfCall.classx = static_cast<int32_t>(size);
322     cfCall.number = number;
323     cfCall.type = static_cast<int32_t>(size);
324     cfCall.reason = static_cast<int32_t>(size);
325 
326     cfData.WriteInt32(slotId);
327     WriteSsResult(cfData, normalResult, callSize, flag, size);
328     cfData.WriteInt32(callSize);
329 
330     if (!cfData.WriteInt32(cfCall.serial) || !cfData.WriteInt32(cfCall.result) || !cfData.WriteInt32(cfCall.status) ||
331         !cfData.WriteInt32(cfCall.classx) || !cfData.WriteString(cfCall.number) || !cfData.WriteInt32(cfCall.type) ||
332         !cfData.WriteInt32(cfCall.reason) || !cfData.WriteInt32(cfCall.time) || !cfData.WriteInt32(cfCall.startHour) ||
333         !cfData.WriteInt32(cfCall.startMinute) || !cfData.WriteInt32(cfCall.endHour) ||
334         !cfData.WriteInt32(cfCall.endMinute)) {
335         return;
336     }
337     stub->OnGetCallTransferResponseInner(cfData, cfReply);
338 }
339 
TestICCbWithCallMediaModeRequestReport(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)340 void TestICCbWithCallMediaModeRequestReport(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
341 {
342     int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
343     MessageParcel callMediaModeRequestData;
344     MessageParcel callMediaModeRequestReply;
345     ImsCallModeReceiveInfo callModeRequest;
346     callModeRequest.callIndex = static_cast<int32_t>(size % CALL_INDEX_NUM);
347     callModeRequest.result = static_cast<ImsCallModeRequestResult>(size % REQUEST_NUM);
348     callModeRequest.callType = static_cast<ImsCallType>(size % TYPE_NUM);
349     callMediaModeRequestData.WriteInt32(slotId);
350     callMediaModeRequestData.WriteRawData((const void *)&callModeRequest, sizeof(ImsCallModeReceiveInfo));
351     stub->OnReceiveUpdateCallMediaModeRequestInner(callMediaModeRequestData, callMediaModeRequestReply);
352 }
353 
TestICCbWithCallMediaModeResponseReport(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)354 void TestICCbWithCallMediaModeResponseReport(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
355 {
356     int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
357     MessageParcel callMediaModeResponseData;
358     MessageParcel callMediaModeResponseReply;
359     ImsCallModeReceiveInfo callModeResponse;
360     callModeResponse.callIndex = static_cast<int32_t>(size % CALL_INDEX_NUM);
361     callModeResponse.result = static_cast<ImsCallModeRequestResult>(size % REQUEST_NUM);
362     callModeResponse.callType = static_cast<ImsCallType>(size % TYPE_NUM);
363     callMediaModeResponseData.WriteInt32(slotId);
364     callMediaModeResponseData.WriteRawData((const void *)&callModeResponse, sizeof(ImsCallModeReceiveInfo));
365     stub->OnReceiveUpdateCallMediaModeResponseInner(callMediaModeResponseData, callMediaModeResponseReply);
366 }
367 
TestICCbWithCallSessionEventChanged(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)368 void TestICCbWithCallSessionEventChanged(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
369 {
370     int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
371     MessageParcel callSessionData;
372     MessageParcel callSessionReply;
373     ImsCallSessionEventInfo callSessionEventInfo;
374     callSessionEventInfo.callIndex = static_cast<int32_t>(size % CALL_INDEX_NUM);
375     callSessionEventInfo.eventType = static_cast<VideoCallEventType>(size % VIDEO_CALL_EVENT_NUM);
376     callSessionData.WriteInt32(slotId);
377     callSessionData.WriteRawData((const void *)&callSessionEventInfo, sizeof(ImsCallSessionEventInfo));
378     stub->OnCallSessionEventChangedInner(callSessionData, callSessionReply);
379 }
380 
TestICCbWithPeerDimensionsChanged(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)381 void TestICCbWithPeerDimensionsChanged(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
382 {
383     int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
384     MessageParcel callPeerDimensionsData;
385     MessageParcel callPeerDimensionsReply;
386     ImsCallPeerDimensionsInfo callPeerDimensionsInfo;
387     callPeerDimensionsInfo.callIndex = static_cast<int32_t>(size % CALL_INDEX_NUM);
388     callPeerDimensionsInfo.width = static_cast<int32_t>(size);
389     callPeerDimensionsInfo.height = static_cast<int32_t>(size);
390     callPeerDimensionsData.WriteInt32(slotId);
391     callPeerDimensionsData.WriteRawData((const void *)&callPeerDimensionsInfo, sizeof(ImsCallPeerDimensionsInfo));
392     stub->OnPeerDimensionsChangedInner(callPeerDimensionsData, callPeerDimensionsReply);
393 }
394 
TestICCbWithCallDataUsageChanged(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)395 void TestICCbWithCallDataUsageChanged(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
396 {
397     int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
398     MessageParcel callDataUsageIData;
399     MessageParcel callDataUsageIReply;
400     ImsCallDataUsageInfo callDataUsageInfo;
401     callDataUsageInfo.callIndex = static_cast<int32_t>(size % CALL_INDEX_NUM);
402     callDataUsageInfo.dataUsage = static_cast<int64_t>(size);
403     callDataUsageIData.WriteInt32(slotId);
404     callDataUsageIData.WriteRawData((const void *)&callDataUsageInfo, sizeof(ImsCallDataUsageInfo));
405     stub->OnCallDataUsageChangedInner(callDataUsageIData, callDataUsageIReply);
406 }
407 
TestICCbWithCameraCapabilitiesChanged(const uint8_t * data,size_t size,sptr<ImsCallCallbackStub> & stub)408 void TestICCbWithCameraCapabilitiesChanged(const uint8_t *data, size_t size, sptr<ImsCallCallbackStub> &stub)
409 {
410     int32_t slotId = static_cast<int32_t>(size % SLOT_NUM);
411     MessageParcel cameraCapabilitiesData;
412     MessageParcel cameraCapabilitiesReply;
413     CameraCapabilitiesInfo cameraCapabilitiesInfo;
414     cameraCapabilitiesInfo.callIndex = static_cast<int32_t>(size % CALL_INDEX_NUM);
415     cameraCapabilitiesInfo.width = static_cast<int32_t>(size);
416     cameraCapabilitiesInfo.height = static_cast<int32_t>(size);
417     cameraCapabilitiesData.WriteInt32(slotId);
418     cameraCapabilitiesData.WriteRawData((const void *)&cameraCapabilitiesInfo, sizeof(CameraCapabilitiesInfo));
419     stub->OnCameraCapabilitiesChangedInner(cameraCapabilitiesData, cameraCapabilitiesReply);
420 }
421 
DoSomethingInterestingWithMyAPI(const uint8_t * data,size_t size)422 void DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size)
423 {
424     if (data == nullptr || size == 0) {
425         return;
426     }
427 
428     if (!IsServiceInited()) {
429         return;
430     }
431 
432     sptr<ImsCallCallbackStub> stub = (std::make_unique<ImsCallCallbackStub>()).release();
433     if (stub == nullptr) {
434         return;
435     }
436 
437     OnRemoteRequest(data, size);
438     TestImsCallCallbackFunction(data, size, stub);
439     TestImsCallCallbackExFunction(data, size, stub);
440     TestImsConfigCallbackFunction(data, size, stub);
441     TestImsUTCallbackFunction(data, size, stub);
442     TestUTCallbackFunction(data, size, stub);
443     TestCFCallbackFunction(data, size, stub);
444     // IMS video call callback test(ICCb: ImsCallCallback)
445     TestICCbWithCallMediaModeRequestReport(data, size, stub);
446     TestICCbWithCallMediaModeResponseReport(data, size, stub);
447     TestICCbWithCallSessionEventChanged(data, size, stub);
448     TestICCbWithPeerDimensionsChanged(data, size, stub);
449     TestICCbWithCallDataUsageChanged(data, size, stub);
450     TestICCbWithCameraCapabilitiesChanged(data, size, stub);
451 }
452 } // namespace OHOS
453 
454 /* Fuzzer entry point */
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)455 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
456 {
457     OHOS::AddCellularCallTokenFuzzer token;
458     /* Run your code on data */
459     OHOS::DoSomethingInterestingWithMyAPI(data, size);
460     return 0;
461 }
462