CID 609036: Avoid to exceed length of string

This commit is contained in:
Philippe Saint-Pierre
2012-07-20 18:31:43 -04:00
parent cd383c3378
commit a65ef31585
+1 -1
View File
@@ -215,7 +215,7 @@ void
openlog_team(const char *ident, int options, int facility) openlog_team(const char *ident, int options, int facility)
{ {
if (ident != NULL) if (ident != NULL)
strcpy(sTeamContext.ident, ident); strlcpy(sTeamContext.ident, ident, sizeof(sTeamContext.ident));
sTeamContext.options = options; sTeamContext.options = options;
sTeamContext.facility = SYSLOG_FACILITY(facility); sTeamContext.facility = SYSLOG_FACILITY(facility);