[asterisk-commits] branch 1.2 r17489 - in /branches/1.2: CREDITS enum.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Apr 4 23:50:37 MST 2006


Author: oej
Date: Wed Apr  5 01:50:35 2006
New Revision: 17489

URL: http://svn.digium.com/view/asterisk?rev=17489&view=rev
Log:
Issue #6654: Enum crash on ADDRESS record, possibly bad record, but still a crash

Modified:
    branches/1.2/CREDITS
    branches/1.2/enum.c

Modified: branches/1.2/CREDITS
URL: http://svn.digium.com/view/asterisk/branches/1.2/CREDITS?rev=17489&r1=17488&r2=17489&view=diff
==============================================================================
--- branches/1.2/CREDITS (original)
+++ branches/1.2/CREDITS Wed Apr  5 01:50:35 2006
@@ -12,6 +12,8 @@
 Telesthetic - for supporting SIP development
 
 Christos Ricudis - for substantial code contributions
+
+nic.at - ENUM support in Asterisk
 
 Paul Bagyenda, Digital Solutions - for initial Voicetronix driver development
 

Modified: branches/1.2/enum.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/enum.c?rev=17489&r1=17488&r2=17489&view=diff
==============================================================================
--- branches/1.2/enum.c (original)
+++ branches/1.2/enum.c Wed Apr  5 01:50:35 2006
@@ -87,8 +87,8 @@
 	len = olen = (int)src[0];
 	src++;
 	srclen--;
-	if (len > srclen) {
-		ast_log(LOG_WARNING, "Want %d, got %d\n", len, srclen);
+	if (len > srclen || len < 0 ) {
+		ast_log(LOG_WARNING, "ENUM parsing failed: Wanted %d characters, got %d\n", len, srclen);
 		return -1;
 	}
 	if (len > maxdatalen)



More information about the asterisk-commits mailing list