# HG changeset patch # User Thomas Butter # Date 1141673518 0 # Node ID c74401cfef23517470ecde3d6194fd6e41d1148c # Parent 20d8b97a07be80dac8a4169f6bb4345bd6a563cb [gaim-migrate @ 15779] If Content-Length is the last header the \r is already replaced with \0. Fixes CID 39 committer: Tailor Script diff -r 20d8b97a07be -r c74401cfef23 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;