diff options
author | sinikang <sinikang@samsung.com> | 2019-02-18 13:59:00 +0900 |
---|---|---|
committer | sinikang <sinikang@samsung.com> | 2019-02-18 14:54:22 +0900 |
commit | f55c1c24b4a2378f7e3c23610ed9cc54a5298be0 (patch) | |
tree | 17fce594cf41957f73abc5a6a8520237c8e403bc | |
parent | d2c132a23671523e75e1f18e591a3506614a36a4 (diff) | |
download | w-ciss-tizen_5.5.tar.gz w-ciss-tizen_5.5.tar.bz2 w-ciss-tizen_5.5.zip |
Fix svace issue (378706, 410179, 410180)tizen_5.5.m2_releasesubmit/tizen_5.5_wearable_hotfix/20201027.114701submit/tizen_5.5_wearable_hotfix/20201026.1843010submit/tizen_5.5_mobile_hotfix/20201027.114301submit/tizen_5.5_mobile_hotfix/20201026.1851010submit/tizen_5.5/20191031.000013submit/tizen_5.5/20191031.000011submit/tizen_5.5/20191031.000009submit/tizen/20200107.003545submit/tizen/20190218.071052accepted/tizen/unified/20200107.043437accepted/tizen/unified/20190218.163132accepted/tizen/5.5/unified/wearable/hotfix/20201027.091830accepted/tizen/5.5/unified/mobile/hotfix/20201027.060657accepted/tizen/5.5/unified/20191031.034016tizen_5.5_wearable_hotfixtizen_5.5_tvtizen_5.5_mobile_hotfixtizen_5.5accepted/tizen_5.5_unified_wearable_hotfixaccepted/tizen_5.5_unified_mobile_hotfixaccepted/tizen_5.5_unified
- missing null termination on string copy
- incorrect base type on string memset
Change-Id: Id06ae16cd22f57b52211ec89b418d887d356166c
Signed-off-by: sinikang <sinikang@samsung.com>
-rw-r--r-- | packaging/org.tizen.w-ciss.spec | 2 | ||||
-rw-r--r-- | src/ciss-parser.c | 3 | ||||
-rw-r--r-- | src/ciss-util.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/packaging/org.tizen.w-ciss.spec b/packaging/org.tizen.w-ciss.spec index e2c23e6..fd0d2f8 100644 --- a/packaging/org.tizen.w-ciss.spec +++ b/packaging/org.tizen.w-ciss.spec @@ -1,6 +1,6 @@ %define major 0 %define minor 1 -%define patchlevel 7 +%define patchlevel 8 Name: org.tizen.w-ciss Summary: CISS-MMI application diff --git a/src/ciss-parser.c b/src/ciss-parser.c index b1f85d1..62aad30 100644 --- a/src/ciss-parser.c +++ b/src/ciss-parser.c @@ -236,8 +236,7 @@ static unsigned char __ciss_parse_mmi_string(ciss_mmi_context_t *mmi_ctx, int *e if (ss_type == CISS_SERVICE_FORWARDING) { if (sia[0] != '\0') { memset(mmi_ctx->forward_number, 0, CISS_NUMBER_LEN_MAX+1); - strncpy(mmi_ctx->forward_number, sia, strlen(sia)); - mmi_ctx->forward_number[strlen(sia)] = '\0'; + strncpy(mmi_ctx->forward_number, sia, CISS_NUMBER_LEN_MAX); } } } diff --git a/src/ciss-util.c b/src/ciss-util.c index 522d8c1..3b29406 100644 --- a/src/ciss-util.c +++ b/src/ciss-util.c @@ -26,7 +26,7 @@ char *_ciss_strcpy(char *pBuffer, int nBufCount, const char *pszString) { retv_if(pBuffer == NULL, NULL); - memset(pBuffer, 0, sizeof(pBuffer)); + memset(pBuffer, 0, nBufCount * sizeof(char)); if ((nBufCount - 1) >= (int)strlen(pszString)) { strncpy(pBuffer, pszString, (int)strlen(pszString)); |