summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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));