Yet a bug with extensible sbufs being marked as OVERFLOWED. This time

because of a signed/unsigned problem.

Approved by:	DES
This commit is contained in:
Poul-Henning Kamp 2002-01-24 20:57:56 +00:00
parent 46d0cbc2cd
commit 9118ec5a27

View File

@ -268,7 +268,7 @@ sbuf_bcat(struct sbuf *s, const char *str, size_t len)
if (SBUF_HASOVERFLOWED(s))
return (-1);
while (len--) {
for (; len; len--) {
if (!SBUF_HASROOM(s) && sbuf_extend(s, len) < 0)
break;
s->s_buf[s->s_len++] = *str++;