commit - b4d0a4038398c23d015bd3faf6247a0dd91016a9
commit + 51e5ba94b3f28f84aadc140f0c340d03d2a11d6c
blob - d98dc6c847ec85cf9d13fca676bb78f26e5dd4df
blob + b0accd41edb6476a6d85e27567618b65402906dd
--- src/ngircd/lists.c
+++ src/ngircd/lists.c
if (!at && !excl) {
/* Neither "!" nor "@" found: use string as nickname */
- strlcpy(mask, Pattern, len);
+ strlcpy(mask, Pattern, len - 5);
strlcat(mask, "!*@*", len);
} else if (!at && excl) {
/* Domain part is missing */
- strlcpy(mask, Pattern, len);
+ strlcpy(mask, Pattern, len - 3);
strlcat(mask, "@*", len);
} else if (at && !excl) {
/* User name is missing */
*at = '\0'; at++;
- strlcpy(mask, Pattern, len);
+ strlcpy(mask, Pattern, len - 5);
strlcat(mask, "!*@", len);
strlcat(mask, at, len);
} else {