summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinikang <sinikang@samsung.com>2019-02-18 13:59:00 +0900
committersinikang <sinikang@samsung.com>2019-02-18 14:54:22 +0900
commitf55c1c24b4a2378f7e3c23610ed9cc54a5298be0 (patch)
tree17fce594cf41957f73abc5a6a8520237c8e403bc
parentd2c132a23671523e75e1f18e591a3506614a36a4 (diff)
downloadw-ciss-tizen_5.5.tar.gz
w-ciss-tizen_5.5.tar.bz2
w-ciss-tizen_5.5.zip
- 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.spec2
-rw-r--r--src/ciss-parser.c3
-rw-r--r--src/ciss-util.c2
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));