Commit caad1eb
fix: critical bugs in DNS proxy (#201)
- main.c: fix NULL pointer dereference in https_resp_cb() — req was
used before NULL check, and FLOG also dereferenced NULL req->tx_id
- main.c: fix potential crash in get_host_from_uri() — strlen(host)
was called before checking curl_url_get() return code, host could
be NULL
- dns_server_tcp.c: fix data corruption on EAGAIN — sent += len was
executed with len == -1 when EAGAIN/EWOULDBLOCK occurred, causing
negative offset; added continue to skip the addition
- dns_server_tcp.c: fix format string mismatches in FLOG() calls —
format had 2 specifiers but 4 arguments were passed (ipstr, port,
strerror, errno); changed format to include all 4 arguments
- dns_server_tcp.c: fix typo 'listaning' -> 'listening'
- https_client.c: remove deprecated CURLPIPE_HTTP1 (since libcurl
7.62.0), keep only CURLPIPE_MULTIPLEX
Co-authored-by: afanasyev <aafanasev@rtk-soft.ru>1 parent 67ecae0 commit caad1eb
3 files changed
+16
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| 347 | + | |
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
662 | | - | |
| 662 | + | |
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | | - | |
92 | 93 | | |
93 | | - | |
| 94 | + | |
94 | 95 | | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
0 commit comments