diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2021-09-09 14:48:21 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2021-09-09 14:51:26 +0000 |
| commit | 635eb7ac7990a2bb29e1992b739617a9db012bf2 (patch) | |
| tree | aa401d2b40e89bee26214801df578b5858a08935 /lib/libfetch | |
| parent | 187afc58791cd877c8ba0573b7826c31db8c6f73 (diff) | |
Diffstat (limited to 'lib/libfetch')
| -rw-r--r-- | lib/libfetch/http.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c index 61f0f393ed98..bcb089dc0fc4 100644 --- a/lib/libfetch/http.c +++ b/lib/libfetch/http.c @@ -1526,12 +1526,13 @@ http_get_proxy(struct url * url, const char *flags) static void http_print_html(FILE *out, FILE *in) { - size_t len = 0; + ssize_t len = 0; + size_t cap; char *line = NULL, *p, *q; int comment, tag; comment = tag = 0; - while (getline(&line, &len, in) >= 0) { + while ((len = getline(&line, &cap, in)) >= 0) { while (len && isspace((unsigned char)line[len - 1])) --len; for (p = q = line; q < line + len; ++q) { |
