# HG changeset patch # User Thomas Butter # Date 1141673518 0 # Node ID 9abc78d6db9192f4b17bb164a1b8deb5829ee08a # Parent 06b6241d1cfbce0e4d4301b73d3ca008ebca248c [gaim-migrate @ 15779] If Content-Length is the last header the \r is already replaced with \0. Fixes CID 39 diff -r 06b6241d1cfb -r 9abc78d6db91 src/proxy.c --- 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;