diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-04 23:36:53 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-04 23:36:53 +0000 |
commit | 591be47a263713aabee896291d4ffa90fe5cc6f5 (patch) | |
tree | ea0417672f416ee8ee73a6d6808108bab88adde1 /main | |
parent | b1f370ccb63b122a07a5ef2b3b221de7a3958911 (diff) |
Protect against overflow, when calculating how long to wait for a frame.
(closes issue #17128)
Reported by: under
Patches:
d.diff uploaded by under (license 914)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@261093 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/channel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c index c6ba4fd7b..bdcc08a47 100644 --- a/main/channel.c +++ b/main/channel.c @@ -1791,7 +1791,7 @@ struct ast_channel *ast_waitfor_nandfds(struct ast_channel **c, int n, int *fds, } /* Wait full interval */ rms = *ms; - if (whentohangup) { + if (whentohangup && whentohangup < LONG_MAX / 1000) { /* Protect against overflow */ rms = whentohangup * 1000; /* timeout in milliseconds */ if (*ms >= 0 && *ms < rms) /* original *ms still smaller */ rms = *ms; |