diff options
Diffstat (limited to 'src/ciss-parser.c')
-rw-r--r-- | src/ciss-parser.c | 3 |
1 files changed, 1 insertions, 2 deletions
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); } } } |