Update patches applied in Tizen 4.0 65/143665/1 accepted/tizen/3.0/common/20170814.174837 accepted/tizen/3.0/ivi/20170813.224801 accepted/tizen/3.0/mobile/20170813.224749 accepted/tizen/3.0/tv/20170813.224742 accepted/tizen/3.0/wearable/20170813.224738 submit/tizen_3.0/20170811.022111
authorchanywa <cbible.kim@samsung.com>
Tue, 18 Jul 2017 22:20:19 +0000 (07:20 +0900)
committerchanywa <cbible.kim@samsung.com>
Fri, 11 Aug 2017 01:46:45 +0000 (10:46 +0900)
Change-Id: Ib765ef27f7cbe930a3a51a462f502036c9d978cc

heremaps-uc-launcher/src/heremaps-uc-launcher.h
heremaps-uc/src/heremaps-uc.c
inc/here_manager.h
maps-plugin-here.changes
packaging/maps-plugin-here.spec
src/here_api.cpp
src/here_manager.cpp
src/here_multirevgeocode.cpp
src/here_revgeocode.cpp

index 97490685f0be775f6047253f881840d7760b5102..bebbe664fd019d48da8c340eb4fda8312bc13a88 100644 (file)
@@ -80,8 +80,8 @@ extern "C" {
 #define dgettext_noop(s)       (s)
 #define N_(s)                  dgettext_noop(s)
 
-#define LS_FUNC_ENTER  LS_LOGD("(%s) ENTER", __FUNCTION__);
-#define LS_FUNC_EXIT   LS_LOGD("(%s) EXIT", __FUNCTION__);
+#define LS_FUNC_ENTER  LS_LOGD("(%s) ENTER", __FUNCTION__);
+#define LS_FUNC_EXIT   LS_LOGD("(%s) EXIT", __FUNCTION__);
 
 
 
index 1265b98c94cd1497487abe497f180eb29691b300..63e2c07352fc463176b7d65f53f32760aed0f032 100644 (file)
@@ -350,7 +350,10 @@ static void _app_language_changed_cb(app_event_info_h event_info, void *user_dat
        LS_FUNC_ENTER
 
        char *locale = vconf_get_str(VCONFKEY_LANGSET);
-       if (locale) elm_language_set(locale);
+       if (locale) {
+               elm_language_set(locale);
+               free(locale);
+       }
 }
 
 int main(int argc, char *argv[])
index a7cc2ef0767d2f123cb253287367f2bd18f333f1..7a1738fe567e42cad6e058936660616a249351d6 100644 (file)
@@ -90,7 +90,7 @@ private:
        here_error_e SetCredentials();
        static bool AppInfoMetadataCb(const char *metadata_key, const char *metadata_value, void *user_data);
        static void NetworkStateChangedIndCb(connection_type_e type, void *user_data);
-       static here_error_e ConvertNetworkErrorCode(const int nErrorCode);
+       here_error_e ConvertNetworkErrorCode(const int nErrorCode);
        connection_h m_hConnection;
        static int m_nRefCnt;
        static HereManager *m_pHereManager;
index d348b2571b97b7467eafd56599a8e4c55b473ca2..cec96f445e279218c2aa517b89493813618c2f59 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   maps-plugin-here_0.3.20
+[Date]      11 Aug 2017
+[Title]     Update heremaps-engine to prevent crashes
+[Developer] Seechan Kim <cbible.kim@samsung.com>
+
 [Version]   maps-plugin-here_0.3.19
 [Date]      31 May 2017
 [Title]     Fix to set origin and destination when routing with waypoints.
index 0b3faef721024416f7f221ee5feedd6c79f3f383..84836ebb9aff88dc8bc5505b4ede2ab20e34334b 100644 (file)
@@ -1,6 +1,6 @@
 Name:       maps-plugin-here
 Summary:    Tizen HERE Maps Plug-in Library
-Version:    0.3.19
+Version:    0.3.20
 Release:    1
 Group:      Location/Libraries
 License:    Apache-2.0 and HERE
index 25ba368431579a464beabec964f61a881fd74ea4..e1127cd29f83d826ab64786be1b719a34532bbb0 100644 (file)
@@ -678,7 +678,7 @@ int HerePluginCancelRequest(int nReqId)
 int HerePluginCreateMapView(maps_view_h hView, maps_plugin_map_view_ready_cb pCbFunc)
 {
        HereView *vh = NULL, *ovh = NULL;
-       vh = new HereView();
+       vh = new (std::nothrow) HereView();
        if (!vh) return HERE_ERROR_OUT_OF_MEMORY;
        int error = maps_view_get_maps_plugin_view_handle(hView, (void**)&ovh);
        maps_view_set_maps_plugin_view_handle(hView, vh);
index e8e3b967a1810bfb3474ce76fdf3f190b34f1f54..d6e5cf91828fcec9c17c6e4e7ca40cbdd5ef96bb 100644 (file)
@@ -467,7 +467,8 @@ here_error_e HereManager::SetProxyAddress()
                MAPS_LOGD("Proxy = %s", (proxy_address ? proxy_address : "(null)"));
                Tizen::Maps::HereConfig::SetProxyAddress(proxy_address);
        }
-       g_free(proxy_address);
+       if (proxy_address)
+               free(proxy_address);
 
        return ConvertNetworkErrorCode(errorCode);
 }
index 057fe05c0be563ff2f2cc2017e8b14285ef84dfc..76abc8155c38fa1f8191e5d7fd8e47a1481efd6f 100644 (file)
@@ -106,70 +106,73 @@ void HereMultiRevGeocode::OnMultiReverseReply(const MultiReverseReply& Reply)
        int nResults = Reply.GetNumResults();
        Result* pResult;
 
-       maps_address_list_h address_list;
+       maps_address_list_h address_list = NULL;
        maps_address_list_create(&address_list);
        maps_address_h pAddr = NULL;
        String *additionalDataValue = NULL;
 
        for (size_t i = 0; i < (size_t)nResults; i++)
        {
-               maps_error_e error = (maps_error_e)maps_address_create(&pAddr);
+               if ((pResult = (Result*)Reply.GetResult(i)) == NULL) continue;
+               if (maps_address_create(&pAddr) != MAPS_ERROR_NONE) continue;
 
-               if(error == MAPS_ERROR_NONE) {
-                       pResult = (Result*)Reply.GetResult(i);
 
-                       if (pResult) {
-                               Address tmpAddr = (pResult->GetLocation()).GetAddress();
+               Address tmpAddr = (pResult->GetLocation()).GetAddress();
 
-                               if(!tmpAddr.GetHouseNumber().empty())
-                                       maps_address_set_building_number(pAddr, tmpAddr.GetHouseNumber().c_str());
+               if(!tmpAddr.GetHouseNumber().empty())
+                       maps_address_set_building_number(pAddr, tmpAddr.GetHouseNumber().c_str());
 
-                               if(!tmpAddr.GetStreet().empty())
-                                       maps_address_set_street(pAddr, tmpAddr.GetStreet().c_str());
+               if(!tmpAddr.GetStreet().empty())
+                       maps_address_set_street(pAddr, tmpAddr.GetStreet().c_str());
 
-                               if(!tmpAddr.GetDistrict().empty())
-                                       maps_address_set_district(pAddr, tmpAddr.GetDistrict().c_str());
+               if(!tmpAddr.GetDistrict().empty())
+                       maps_address_set_district(pAddr, tmpAddr.GetDistrict().c_str());
 
-                               if(!tmpAddr.GetCity().empty())
-                                       maps_address_set_city(pAddr, tmpAddr.GetCity().c_str());
+               if(!tmpAddr.GetCity().empty())
+                       maps_address_set_city(pAddr, tmpAddr.GetCity().c_str());
 
-                               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("CountyName");
-                               if (additionalDataValue && !additionalDataValue->empty())
-                                       maps_address_set_county(pAddr, additionalDataValue->c_str());
-                               else if (!tmpAddr.GetCounty().empty())
-                                       maps_address_set_county(pAddr, tmpAddr.GetCounty().c_str());
+               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("CountyName");
+               if (additionalDataValue && !additionalDataValue->empty())
+                       maps_address_set_county(pAddr, additionalDataValue->c_str());
+               else if (!tmpAddr.GetCounty().empty())
+                       maps_address_set_county(pAddr, tmpAddr.GetCounty().c_str());
 
-                               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("StateName");
-                               if (additionalDataValue && !additionalDataValue->empty())
-                                       maps_address_set_state(pAddr, additionalDataValue->c_str());
-                               else if (!tmpAddr.GetState().empty())
-                                       maps_address_set_state(pAddr, tmpAddr.GetState().c_str());
+               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("StateName");
+               if (additionalDataValue && !additionalDataValue->empty())
+                       maps_address_set_state(pAddr, additionalDataValue->c_str());
+               else if (!tmpAddr.GetState().empty())
+                       maps_address_set_state(pAddr, tmpAddr.GetState().c_str());
 
-                               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("CountryName");
-                               if (additionalDataValue && !additionalDataValue->empty())
-                                       maps_address_set_country(pAddr, additionalDataValue->c_str());
-                               else if (!tmpAddr.GetCountry().empty())
-                                       maps_address_set_country(pAddr, tmpAddr.GetCountry().c_str());
+               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("CountryName");
+               if (additionalDataValue && !additionalDataValue->empty())
+                       maps_address_set_country(pAddr, additionalDataValue->c_str());
+               else if (!tmpAddr.GetCountry().empty())
+                       maps_address_set_country(pAddr, tmpAddr.GetCountry().c_str());
 
-                               if(!tmpAddr.GetCountry().empty())
-                                       maps_address_set_country_code(pAddr, tmpAddr.GetCountry().c_str());
+               if(!tmpAddr.GetCountry().empty())
+                       maps_address_set_country_code(pAddr, tmpAddr.GetCountry().c_str());
 
-                               if(!tmpAddr.GetPostalCode().empty())
-                                       maps_address_set_postal_code(pAddr, tmpAddr.GetPostalCode().c_str());
+               if(!tmpAddr.GetPostalCode().empty())
+                       maps_address_set_postal_code(pAddr, tmpAddr.GetPostalCode().c_str());
 
-                               if(!tmpAddr.GetLabel().empty())
-                                       maps_address_set_freetext(pAddr, tmpAddr.GetLabel().c_str());
-                       }
-               }
-               maps_address_list_append(address_list, pAddr);
+               if(!tmpAddr.GetLabel().empty())
+                       maps_address_set_freetext(pAddr, tmpAddr.GetLabel().c_str());
+
+               if (maps_address_list_append(address_list, pAddr) != MAPS_ERROR_NONE)
+                       maps_address_destroy(pAddr);
        }
 
+
+       int address_list_length = 0;
+       maps_address_list_get_length(address_list, &address_list_length);
+
        if (m_bCanceled || !m_pCbFunc) {
                maps_address_list_destroy(address_list);
-       } else if (nResults <= 0) {
+       } else if (address_list_length <= 0) {
+               maps_address_list_destroy(address_list);
                ((maps_service_multi_reverse_geocode_cb)m_pCbFunc)(MAPS_ERROR_NOT_FOUND, m_nReqId, 0, NULL, m_pUserData);
        } else {
-               ((maps_service_multi_reverse_geocode_cb)m_pCbFunc)(MAPS_ERROR_NONE, m_nReqId, nResults, address_list, m_pUserData);
+               ((maps_service_multi_reverse_geocode_cb)m_pCbFunc)(MAPS_ERROR_NONE, m_nReqId, address_list_length, address_list, m_pUserData);
        }
 
        delete this;
index ea3c4b8d55f46687fec6cc3eff2a138b50d92f4b..b068d2a52b4b9f890717cb824c012ad2071b1565 100644 (file)
@@ -183,9 +183,12 @@ void HereRevGeocode::OnGeoCoderReply(const GeoCoderReply& Reply)
 
        if (m_bCanceled) {
                maps_address_destroy(hAddr);
+       }
+       else if (error != MAPS_ERROR_NONE) {
+               maps_address_destroy(hAddr);
+               ((maps_service_reverse_geocode_cb)m_pCbFunc)(error, m_nReqId, 0, 0, NULL, m_pUserData);
        } else {
-               int nResult = (error == MAPS_ERROR_NONE ? 1 : 0);
-               ((maps_service_reverse_geocode_cb)m_pCbFunc)(error, m_nReqId, 0, nResult, hAddr, m_pUserData);
+               ((maps_service_reverse_geocode_cb)m_pCbFunc)(error, m_nReqId, 0, 1, hAddr, m_pUserData);
        }
 
        delete this;