From de6898af20c1341fc8c4886a936279b791f0d772 Mon Sep 17 00:00:00 2001 From: Bhavna Sharma Date: Mon, 9 Oct 2017 11:42:11 -0700 Subject: [PATCH] Fix crash in AgpsManager when accessing invalid pointer Crash was happening because a local structure was being passed over by reference to the MsgTask, as a result data was being read and saved from the reference when the local structure was already out of scope. CRs-Fixed: 2124083 Change-Id: Ifb24652d5b665a47b8ae88f43dd86876274a28cf --- gnss/GnssAdapter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index 404f19b7..a04be995 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -2554,7 +2554,7 @@ void GnssAdapter::initAgpsCommand(const AgpsCbInfo& cbInfo){ /* Message to initialize AGPS module */ struct AgpsMsgInit: public LocMsg { - const AgpsCbInfo& mCbInfo; + const AgpsCbInfo mCbInfo; GnssAdapter& mAdapter; inline AgpsMsgInit(const AgpsCbInfo& cbInfo,