mirror of
https://github.com/anope/anope.git
synced 2026-07-04 09:23:13 +02:00
Prevent potential overflows of time values.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2094 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -24,7 +24,7 @@ class CommandOSIgnore : public Command
|
||||
{
|
||||
const char *time = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
const char *nick = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
int t;
|
||||
time_t t;
|
||||
|
||||
if (!time || !nick)
|
||||
{
|
||||
|
||||
@@ -224,7 +224,7 @@ class CommandOSException : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
int expires = expiry ? dotime(expiry) : ExceptionExpiry;
|
||||
time_t expires = expiry ? dotime(expiry) : ExceptionExpiry;
|
||||
if (expires < 0)
|
||||
{
|
||||
notice_lang(s_OperServ, u, BAD_EXPIRY_TIME);
|
||||
|
||||
Reference in New Issue
Block a user