diff options
author | Abhishek Vijay <abhishek.v@samsung.com> | 2019-09-30 15:31:48 +0530 |
---|---|---|
committer | Abhishek Vijay <abhishek.v@samsung.com> | 2019-09-30 15:31:48 +0530 |
commit | 7e054bf6834cde6e5c9de895c8e2b0d7f1a094c5 (patch) | |
tree | b14ba902e925df63e4c7526c26e5d5f908c96cfb | |
parent | f9da9e0a90cc591dff638af886b539659d4e7da6 (diff) | |
download | sync-manager-accepted/tizen_5.5_unified.tar.gz sync-manager-accepted/tizen_5.5_unified.tar.bz2 sync-manager-accepted/tizen_5.5_unified.zip |
ASAN Issue fixestizen_5.5.m2_releasesubmit/tizen_5.5_wearable_hotfix/20201026.184301submit/tizen_5.5_mobile_hotfix/20201026.185101submit/tizen_5.5/20191031.000002submit/tizen/20191016.055546submit/tizen/20191009.055454submit/tizen/20191007.101345submit/tizen/20191001.082804accepted/tizen/unified/20191009.231754accepted/tizen/5.5/unified/wearable/hotfix/20201027.122912accepted/tizen/5.5/unified/mobile/hotfix/20201027.081503accepted/tizen/5.5/unified/20191031.030126tizen_5.5_wearable_hotfixtizen_5.5_tvtizen_5.5_mobile_hotfixaccepted/tizen_5.5_unified_wearable_hotfixaccepted/tizen_5.5_unified_mobile_hotfixaccepted/tizen_5.5_unified
Change-Id: I9c26c8092245453eda03b7e380eaeba000995b0a
Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
-rw-r--r-- | src/sync-service/SyncManager_RepositoryEngine.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sync-service/SyncManager_RepositoryEngine.cpp b/src/sync-service/SyncManager_RepositoryEngine.cpp index e2b16f0..7ed6243 100644 --- a/src/sync-service/SyncManager_RepositoryEngine.cpp +++ b/src/sync-service/SyncManager_RepositoryEngine.cpp @@ -1946,11 +1946,17 @@ RepositoryEngine::UpdateSyncJobToDB(const char *SvcAppId, int UserId, const char char *update_query = NULL; string SvcPkgId = SyncManager::GetInstance()->GetPkgIdByAppId(SvcAppId); + char *svc_pkg_id = new char[SvcPkgId.size() + 1]; + copy(SvcPkgId.begin(), SvcPkgId.end(), svc_pkg_id); + svc_pkg_id[SvcPkgId.size() + 1] = '\0'; + update_query = sqlite3_mprintf("UPDATE %Q SET AppStatus=%Q, SyncJobId=%Q, AccountId=%Q, Interval=%Q, " "Expedit=%Q, NoRetry=%Q, UserDataKey=%Q, UserDataValue=%Q " "WHERE SvcAppId=%Q AND PkgName=%Q AND UserId=%Q AND SyncType=%Q AND JobName=%Q", SYNC_JOB_TABLE, AppStatus, jobId, accId, interval, expedit, noRetry, UserKey, UserValue, - SvcAppId, SvcPkgId.c_str(), uid, SyncType, JobName); + SvcAppId, svc_pkg_id, uid, SyncType, JobName); + + delete[] svc_pkg_id; sqlite3_stmt *stmt = NULL; int ret = SQLITE_OK; |