X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=callerid.c;h=a60c45131ead4b5d0ed34ff9cdbfd26e83c0f787;hp=b9e59ab0a9d571df9b868a84249c91341707bfdf;hb=7740a62116d9e3ab50082149ae998ffa77b76298;hpb=08aad9a8c5ad279759e0a870b1dd0d8159ce3444 diff --git a/callerid.c b/callerid.c index b9e59ab..a60c451 100644 --- a/callerid.c +++ b/callerid.c @@ -45,14 +45,14 @@ const char *numberrize_callerinfo(const char *string, int ntype, const char *nat { case INFO_NTYPE_INTERNATIONAL: strcpy(result, international); - strncat(result, string, sizeof(result)); + strncat(result, string, sizeof(result)-strlen(result)-1); result[sizeof(result)-1] = '\0'; return(result); break; case INFO_NTYPE_NATIONAL: strcpy(result, national); - strncat(result, string, sizeof(result)); + strncat(result, string, sizeof(result)-strlen(result)-1); result[sizeof(result)-1] = '\0'; return(result); break;