[gaim-migrate @ 15779]

Mon, 06 Mar 2006 19:31:58 +0000

author
Thomas Butter <tbutter@users.sourceforge.net>
date
Mon, 06 Mar 2006 19:31:58 +0000
changeset 13405
9abc78d6db91
parent 13404
06b6241d1cfb
child 13406
414b4dfdb900

[gaim-migrate @ 15779]
If Content-Length is the last header the \r is already replaced with \0.
Fixes CID 39

src/proxy.c file | annotate | diff | comparison | revisions
--- 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;

mercurial