[asterisk-commits] tilghman: branch 1.4 r261093 - /branches/1.4/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 4 18:36:57 CDT 2010


Author: tilghman
Date: Tue May  4 18:36:53 2010
New Revision: 261093

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=261093
Log:
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)

Modified:
    branches/1.4/main/channel.c

Modified: branches/1.4/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/channel.c?view=diff&rev=261093&r1=261092&r2=261093
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Tue May  4 18:36:53 2010
@@ -1791,7 +1791,7 @@
 	}
 	/* 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;




More information about the asterisk-commits mailing list