Conversation
Correct start index for parse_nameservers. The reason 2 was used instead of one dates back from when we were using the ircd string_to_array function which treats parv[0] as special. When we changed to the libratbox version, this behavior doesn't happen.
Bail on zero length buffer to rb_linebuf_get
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71e97eb132
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| size_t cpylen; | ||
| char *start, *ch; | ||
|
|
||
| lrb_assert(buflen > 0); |
There was a problem hiding this comment.
Avoid abort when recvq is empty for zlib setup
The new lrb_assert(buflen > 0) in rb_linebuf_get will abort in builds without SOFT_ASSERT when buflen is 0. This is reachable in start_zlib_session (src/sslproc.c) because it calls rb_linebuf_get in a do { ... } while (cpylen > 0) loop with left = recvqlen, and recvqlen can be 0 when no data is queued. In that case the first call passes buflen==0 and the process asserts, which is a regression from the previous behavior where empty queues were tolerated. Consider early-returning on buflen==0 or skipping the call when recvqlen==0.
Useful? React with 👍 / 👎.
No description provided.