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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89590

View File

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