mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Merged revisions 100378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r100378 | qwell | 2008-01-25 15:24:49 -0600 (Fri, 25 Jan 2008) | 2 lines This would have never been true, since we're passing (sizeof(req.data) - 1) as the len to recvfrom(). ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -17778,11 +17778,10 @@ static int sipsock_read(int *id, int fd, short events, void *ignore)
|
||||
ast_log(LOG_WARNING, "Recv error: %s\n", strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
if (res == sizeof(req.data)) {
|
||||
if (res == sizeof(req.data) - 1)
|
||||
ast_debug(1, "Received packet exceeds buffer. Data is possibly lost\n");
|
||||
req.data[sizeof(req.data) - 1] = '\0';
|
||||
} else
|
||||
req.data[res] = '\0';
|
||||
|
||||
req.data[res] = '\0';
|
||||
req.len = res;
|
||||
|
||||
req.socket.fd = sipsock;
|
||||
|
Reference in New Issue
Block a user