[svn-commits] anthonyl: branch anthonyl/7774-branch r48242 - /team/anthonyl/7774-branch/cha...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Dec 4 13:18:03 MST 2006


Author: anthonyl
Date: Mon Dec  4 14:18:02 2006
New Revision: 48242

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48242
Log:
7774 length checking update

Modified:
    team/anthonyl/7774-branch/channels/chan_skinny.c

Modified: team/anthonyl/7774-branch/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/7774-branch/channels/chan_skinny.c?view=diff&rev=48242&r1=48241&r2=48242
==============================================================================
--- team/anthonyl/7774-branch/channels/chan_skinny.c (original)
+++ team/anthonyl/7774-branch/channels/chan_skinny.c Mon Dec  4 14:18:02 2006
@@ -1388,13 +1388,11 @@
 	int res = 0;
 	ast_mutex_lock(&s->lock);
 
-#if 0
 	if (skinnydebug)
-		ast_verbose("writing packet type %04X (%d bytes) to socket %d\n", letohl(req->e), letohl(req->len)+8, s->fd);
-#endif
-
-	if ( letohl(req->len) < 0) {
-		ast_log(LOG_WARNING, "transmit_response: sent a bogus skinny request\n");
+		ast_log(LOG_VERBOSE, "writing packet type %04X (%d bytes) to socket %d\n", letohl(req->e), letohl(req->len)+8, s->fd);
+
+	if (letohl(req->len) > SKINNY_MAX_PACKET || letohl(req->len) < 0) {
+		ast_log(LOG_WARNING, "Transmit: the length of the request is out of bounds\n");
 		return -1;
 	}
 	



More information about the svn-commits mailing list