Fix Sap Service
Because sapDecodeMessage can return NULL in its code logic, to check NULL
before its usage in processResponse might be necessary.
Bug: 65028505
Test: fuzzer
Change-Id: I27ee6ef99c495e29408c3c0d895cb8ee54d54173
diff --git a/libril/sap_service.cpp b/libril/sap_service.cpp
index b9c7e58..ee04afb 100644
--- a/libril/sap_service.cpp
+++ b/libril/sap_service.cpp
@@ -775,6 +775,13 @@
return;
}
+ if (messagePtr == NULL) {
+ RLOGE("processResponse: *messagePtr == NULL; msgId = %d; msgType = %d",
+ msgId, msgType);
+ sapImpl->sendFailedResponse(msgId, rsp->token, 0);
+ return;
+ }
+
RLOGD("processResponse: sapCallback != NULL; msgId = %d; msgType = %d",
msgId, msgType);