[asterisk-commits] dvossel: trunk r264400 - /trunk/main/udptl.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 19 15:30:38 CDT 2010
Author: dvossel
Date: Wed May 19 15:30:33 2010
New Revision: 264400
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=264400
Log:
fixes infinite loop during udptl.c's decode_open_type
When decode_length returns the length there is a check to see if that
length is negative, if so the decode loop breaks as this means the
limit has been reached. The problem here is that length is an
unsigned int, so length can never be negative. This resulted in
an infinite loop.
(issue #17352)
Modified:
trunk/main/udptl.c
Modified: trunk/main/udptl.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/udptl.c?view=diff&rev=264400&r1=264399&r2=264400
==============================================================================
--- trunk/main/udptl.c (original)
+++ trunk/main/udptl.c Wed May 19 15:30:33 2010
@@ -226,8 +226,8 @@
{
unsigned int octet_cnt;
unsigned int octet_idx;
- unsigned int length;
unsigned int i;
+ int length; /* a negative length indicates the limit has been reached in decode_length. */
const uint8_t **pbuf;
for (octet_idx = 0, *p_num_octets = 0; ; octet_idx += octet_cnt) {
More information about the asterisk-commits
mailing list