projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix possible bufferoverflows
[lcr.git]
/
callerid.c
diff --git
a/callerid.c
b/callerid.c
index
b9e59ab
..
a60c451
100644
(file)
--- 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);
{
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);
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;
result[sizeof(result)-1] = '\0';
return(result);
break;