Fix some glitches in redbean

This change includes a fix to Fetch() where an out of bounds memory read
could happen, when the reverse proxied endpoint omits the content-length
header. This caused a bunch of NUL chars to appear on TurfWar's /statusz
since it wouldn't actually overrun the buffer, and if it did it would've
been caught by MODE=asan builds.
This commit is contained in:
Justine Tunney 2022-11-02 09:42:52 -07:00
parent 14d036b68d
commit 6b06a8176d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
6 changed files with 7 additions and 7 deletions

View file

@ -78,7 +78,7 @@ int poll(struct pollfd *fds, size_t nfds, int timeout_ms) {
rc = sys_poll_nt(fds, nfds, &millis, 0);
}
STRACE("poll(%s, %'zu, %'d) → %d% lm\n", DescribePollFds(rc, fds, nfds), nfds,
STRACE("poll(%s, %'zu, %'d) → %d% lm", DescribePollFds(rc, fds, nfds), nfds,
timeout_ms, rc);
return rc;
}