aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-16 19:29:37 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-16 19:29:37 +0000
commit0847802336a1bc4eef66ec91843026197d81b611 (patch)
tree4b64c3b80bb6673a78d78bad6f2e3bbc56b2708e /channels
parent3f1753a96e0f6dced4a0df689c714d1981238cb6 (diff)
Merged revisions 218933 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r218933 | mmichelson | 2009-09-16 14:25:36 -0500 (Wed, 16 Sep 2009) | 12 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.2@218937 f38db490-d61c-443f-a65b-d21fe96a405b
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 327afc3cd..5504bf9ba 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2819,7 +2819,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;
}