Fixes 17#206
Conversation
This reverts commit 442815e. There should not be any use-after-free.
- tighten TCP accept/read/send error handling and non-blocking socket setup - improve logging for dropped TCP clients and response failures - fix UDP bind cleanup - correct address-list buffer bounds checks in dns_poller - refine DNS truncation handling and related response logic
With suggestion to use clangd for IntelliSense purpose.
Also: - breaking long lines for readability - set gcc/clang specific warnings
Some polishing in doh_proxy.c
Details in huge comment in code
|
Hi, no hurry, get well! |
|
|
||
| // Check that we have space for at least one character plus null terminator | ||
| if (pos >= list + POLLER_ADDR_LIST_SIZE - 1) { | ||
| if ((pos - list) >= POLLER_ADDR_LIST_SIZE - 1) { |
There was a problem hiding this comment.
Nit -- just a comment: I don't see the risk here. pos is always greater than list so there is no risk of pos - list underflowing. Were you worried about list + POLLER_ADDR_LIST_SIZE - 1 overflowing or just preference?
There was a problem hiding this comment.
Hi, first: thanks for approving the changes.
About this one: the base check has been added by your (most likely AI) commit 95fe77c
I did not find it wrong, so I have kept it. (Although it may be unnecessary.)
Br, Balázs
aarond10
left a comment
There was a problem hiding this comment.
The compilation changes seem to break MacOS builds. ld64 doesn't support -z. That needs to be conditional.
aarond10
left a comment
There was a problem hiding this comment.
I'll fix the macos build issue -- easy fix.
Hi Aaron,
finally I raised the pull request:
Take your time.
Best regards,
Balázs
PS: these changes worked fine on my machine for a month ;)