[asterisk-commits] russell: branch 1.4 r76485 - /branches/1.4/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 23 07:25:01 CDT 2007


Author: russell
Date: Mon Jul 23 07:25:01 2007
New Revision: 76485

URL: http://svn.digium.com/view/asterisk?view=rev&rev=76485
Log:
Use a signed integer for storing the number of bytes in the packet read from
the network.  Using an unsigned value here made it impossible to handle an
error returned from recvfrom().  Furthermore, in the case that recvfrom()
did return an error, this would cause a crash due to a heap overflow.
(closes issue #10265, reported by and fix suggested by timrobbins)

Modified:
    branches/1.4/channels/chan_iax2.c

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=76485&r1=76484&r2=76485
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Mon Jul 23 07:25:01 2007
@@ -705,7 +705,7 @@
 	struct sockaddr_in iosin;
 	unsigned char readbuf[4096]; 
 	unsigned char *buf;
-	size_t buf_len;
+	ssize_t buf_len;
 	size_t buf_size;
 	int iofd;
 	time_t checktime;




More information about the asterisk-commits mailing list