summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2009-09-16 19:25:36 +0000
committerMark Michelson <mmichelson@digium.com>2009-09-16 19:25:36 +0000
commit19aeff195afa0ab232312d9d78ea148c9d89d184 (patch)
tree17b6a6e6d76d51b37de9fddbb32d05357798d8c4 /channels
parent5c52a7a746fa26a121ec0674230dd1bc327a9ee9 (diff)
Reverse order of args to fread.
This way, we don't always write a null byte into byte 1 of the buffer (closes issue #15905) Reported by: ebroad Patches: freadfix.patch uploaded by ebroad (license 878) Tested by: ebroad git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f156a457f..ecfe951f1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2964,7 +2964,7 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi
while (cl > 0) {
size_t bytes_read;
ast_mutex_lock(&tcptls_session->lock);
- if (!(bytes_read = fread(buf, MIN(sizeof(buf) - 1, cl), 1, tcptls_session->f))) {
+ if (!(bytes_read = fread(buf, 1, MIN(sizeof(buf) - 1, cl), tcptls_session->f))) {
ast_mutex_unlock(&tcptls_session->lock);
goto cleanup;
}