From 67754118cec93d8032fda2e66901e157373ae407 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Thu, 27 Sep 2012 22:28:12 -0700 Subject: [PATCH] ATL call crash fix AgpsStatus added with a couple string fields for wifi which are not NULL ended when they are not used. This get passed to AFW JNI, and allow UTF8 string with the open ended buffer with junks in it. It might cause exception depending on the content of the garbadge. CRs-Fixed: 405473 Change-Id: If762748a4c63fe1be59491b5d08dbadd479176b3 --- loc_api/libloc_api_50001/loc_eng_agps.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loc_api/libloc_api_50001/loc_eng_agps.h b/loc_api/libloc_api_50001/loc_eng_agps.h index a0873d04..933779bc 100644 --- a/loc_api/libloc_api_50001/loc_eng_agps.h +++ b/loc_api/libloc_api_50001/loc_eng_agps.h @@ -204,7 +204,8 @@ struct Subscriber { inline virtual ~Subscriber() {} virtual void setIPAddresses(int &v4, char* v6) = 0; - inline virtual void setWifiInfo(char* ssid, char* password) {} + inline virtual void setWifiInfo(char* ssid, char* password) + { ssid[0] = 0; password[0] = 0; } inline virtual bool equals(const Subscriber *s) const { return ID == s->ID; }