Mercurial > pidgin
changeset 13404:c74401cfef23
[gaim-migrate @ 15779]
If Content-Length is the last header the \r is already replaced with \0.
Fixes CID 39
committer: Tailor Script <tailor@pidgin.im>
author | Thomas Butter <tbutter> |
---|---|
date | Mon, 06 Mar 2006 19:31:58 +0000 |
parents | 20d8b97a07be |
children | 851dd370e0fe |
files | src/proxy.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/proxy.c Mon Mar 06 19:28:15 2006 +0000 +++ b/src/proxy.c Mon Mar 06 19:31:58 2006 +0000 @@ -1159,9 +1159,11 @@ char tmpc; p += strlen("Content-Length: "); tmp = strchr((const char *)p, '\r'); - *tmp = '\0'; + if(tmp) + *tmp = '\0'; len = atoi((const char *)p); - *tmp = '\r'; + if(tmp) + *tmp = '\r'; /* Compensate for what has already been read */ len -= phb->read_len - headers_len;