X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Flists.c;h=45a4874b6e94f268aa2a0942cdf249c4aec12a24;hp=4f57ca73521f6b65f568d0aefa9c60b844a685c6;hb=8ec17063a6e651229e04605592ce3d6114075655;hpb=67bd1bf34fc3f7bebb304cdf84284523c8ea09f5 diff --git a/src/ngircd/lists.c b/src/ngircd/lists.c index 4f57ca73..45a4874b 100644 --- a/src/ngircd/lists.c +++ b/src/ngircd/lists.c @@ -149,7 +149,8 @@ Lists_Add(struct list_head *h, const char *Mask, time_t ValidUntil, if (Reason) { newelem->reason = malloc(strlen(Reason) + 1); if (newelem->reason) - strlcpy(newelem->reason, Reason, strlen(Reason) + 1); + strlcpy(newelem->reason, Reason, + sizeof(newelem->reason)); else Log(LOG_EMERG, "Can't allocate memory for new list reason text!");