projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SIP: Fix incoming re-invite
[lcr.git]
/
callerid.c
diff --git
a/callerid.c
b/callerid.c
index
9b31461
..
2f12ac1
100644
(file)
--- a/
callerid.c
+++ b/
callerid.c
@@
-45,20
+45,22
@@
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)-
strlen(result)-
1);
+ strncat(result, string, sizeof(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)-
strlen(result)-
1);
+ strncat(result, string, sizeof(result)-1);
result[sizeof(result)-1] = '\0';
return(result);
break;
default:
result[sizeof(result)-1] = '\0';
return(result);
break;
default:
- return(string);
+ strncpy(result, string, sizeof(result)-1);
+ result[sizeof(result)-1] = '\0';
+ return(result);
}
}
}
}