From cb73ab9d23633a5812d45658404f17b0992394ea Mon Sep 17 00:00:00 2001 From: Adam- Date: Mon, 29 Mar 2010 21:01:43 +0000 Subject: Fixed bug #1144 - replaced some strcpy calls with strscpy to be safer git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2840 5417fbe8-f217-4b02-8779-1006273d7864 --- src/chanserv.c | 2 +- src/mail.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/chanserv.c b/src/chanserv.c index 07ce73299..d6c8a6970 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -1570,7 +1570,7 @@ int check_kick(User * user, char *chan, time_t chants) if (akick->flags & AK_ISNICK) get_idealban(ci, user, mask, sizeof(mask)); else - strcpy(mask, akick->u.mask); + strscpy(mask, akick->u.mask, sizeof(mask)); reason = akick->reason ? akick->reason : CSAutokickReason; goto kick; } diff --git a/src/mail.c b/src/mail.c index fccad34fe..c81d7776a 100644 --- a/src/mail.c +++ b/src/mail.c @@ -242,7 +242,7 @@ int MailValidate(const char *email) if (!email) return 0; - strcpy(copy, email); + strscpy(copy, email, sizeof(copy)); domain = strchr(copy, '@'); if (!domain) -- cgit