From b838fcc22e0ad5d69a37f9612847300560e620d9 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 23 Jul 2007 12:25:01 +0000 Subject: [PATCH] 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) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76485 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_iax2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 57d084f5d3..41670080f3 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -705,7 +705,7 @@ struct iax2_thread { 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;