Commit e60b6b8
committed
tlshd: Dynamically allocate hostname
Ensure that, when allocation or DNS query fails, parms->peername
always remains NULL. tlshd should not assume that the buffer
returned from getnameinfo(3) will remain untouched if that call
is unsuccessful.
Fixes: 7655d96 ("tlshd: Move peername/peeraddr preparation")
Reported-by: Ken Milmore <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>1 parent c0f034b commit e60b6b8
2 files changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
237 | 235 | | |
238 | 236 | | |
239 | 237 | | |
| |||
304 | 302 | | |
305 | 303 | | |
306 | 304 | | |
307 | | - | |
| 305 | + | |
308 | 306 | | |
309 | | - | |
310 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
311 | 310 | | |
312 | 311 | | |
313 | 312 | | |
314 | 313 | | |
315 | 314 | | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
| 322 | + | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
| |||
0 commit comments