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
1.4
Russell Bryant 18 years ago
parent a0ba47ec33
commit b838fcc22e

@ -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;

Loading…
Cancel
Save