/*
- * $Id: client_side.cc,v 1.247 1998/04/01 17:24:09 wessels Exp $
+ * $Id: client_side.cc,v 1.248 1998/04/01 21:23:02 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
end = hdr_in + hdr_len;
for (t = hdr_in; t < end; t += strcspn(t, crlf), t += strspn(t, crlf)) {
l = strcspn(t, crlf) + 1;
+ /* Wow, we might find a NULL before 'end' */
+ if (1 == l)
+ break;
xstrncpy(xbuf, t, l > 4096 ? 4096 : l);
/* enforce 1.0 reply version, this hack will be rewritten */
if (t == hdr_in && !strncasecmp(xbuf, "HTTP/", 5) && l > 8 &&
/*
- * $Id: http.cc,v 1.261 1998/03/31 05:37:42 wessels Exp $
+ * $Id: http.cc,v 1.262 1998/04/01 21:23:01 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
l = strcspn(t, crlf) + 1;
if (l > 4096)
l = 4096;
- if (0 == l)
+ /* We might find a NULL before 'end' */
+ if (1 == l)
break;
xstrncpy(xbuf, t, l);
debug(11, 5) ("httpBuildRequestHeader: %s\n", xbuf);