diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-01-20 19:53:12 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-01-20 19:53:12 +0000 |
| commit | e6f0a33e68efb4e2d30ee51bd452076827240ab1 (patch) | |
| tree | 7fd2d667cd3951b9da20dd5facc59edf5d1ea3a2 /lib/libfetch/http.c | |
| parent | e0583e0c2385421bb28207e39afeaf23b7f1ddb1 (diff) | |
Notes
Diffstat (limited to 'lib/libfetch/http.c')
| -rw-r--r-- | lib/libfetch/http.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c index 615896809ebd..04b7964612fe 100644 --- a/lib/libfetch/http.c +++ b/lib/libfetch/http.c @@ -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; |
