Check the return value from read() when reading the CR/LF at the end of a

chunk.

PR:		bin/33608
MFC after:	2 weeks
This commit is contained in:
Dag-Erling Smørgrav 2002-01-20 19:53:12 +00:00
parent e0583e0c23
commit e6f0a33e68

View File

@ -195,8 +195,10 @@ _http_fillbuf(struct cookie *c)
c->chunksize -= c->b_len;
if (c->chunksize == 0) {
char endl[2];
read(c->fd, endl, 2);
char endl;
if (read(c->fd, &endl, 1) == -1 ||
read(c->fd, &endl, 1) == -1)
return -1;
}
c->b_pos = 0;