summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-16 15:08:42 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-16 15:08:42 +0000
commite1f80a1833f93ff302c01bb31ec935ab9621ac59 (patch)
tree54c75e526862793fdd6fe78be5fb8063ddfc6d8c /src
parent0374d53d28b227e537768417b6b7f86ab1b5ca65 (diff)
Prevent potential overflows of time values.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2094 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/core/os_ignore.c2
-rw-r--r--src/core/os_session.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/os_ignore.c b/src/core/os_ignore.c
index 2585af0c7..c2932a227 100644
--- a/src/core/os_ignore.c
+++ b/src/core/os_ignore.c
@@ -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)
{
diff --git a/src/core/os_session.c b/src/core/os_session.c
index a1c19113e..e6577f578 100644
--- a/src/core/os_session.c
+++ b/src/core/os_session.c
@@ -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);