commit a3844d7a3c9a386d7bc73fb0152fa714533a7e91 from: Omar Polo date: Tue May 14 19:24:23 2024 UTC got-fetch-http: be pedantic with the error checking these functions are expected to return -1 on failure, be strict about it. commit - a46b549764762c6d1ef465471d38ed2d5e152543 commit + a3844d7a3c9a386d7bc73fb0152fa714533a7e91 blob - 1c4ff32948b7d177d38ecc72af4c48171945dfd4 blob + 920b8b12085e70e102a9c9f309d8eb555a2c9671 --- libexec/got-fetch-http/got-fetch-http.c +++ libexec/got-fetch-http/got-fetch-http.c @@ -325,9 +325,9 @@ http_chunk(struct bufio *bio, const void *buf, size_t { int r; - if (bufio_compose_fmt(bio, "%zx\r\n", len) || - bufio_compose(bio, buf, len) || - bufio_compose(bio, "\r\n", 2)) + if (bufio_compose_fmt(bio, "%zx\r\n", len) == -1 || + bufio_compose(bio, buf, len) == -1 || + bufio_compose(bio, "\r\n", 2) == -1) return 1; do {