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:
parent
e0583e0c23
commit
e6f0a33e68
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user