Do not try to process a zero-length buffer at all, thus avoiding
a possible buffer underrun.

--- a/lib/httpproxy.c
+++ b/lib/httpproxy.c
@@ -104,6 +104,8 @@
 				eof = 1;
 				break;
 		}
+		if (eof)
+			break;
 
 		/*
 		 * if last char we read is start of terminator,
