Commit ed09c66
fix: prevent NULL pointer crash when r2h-token is not configured
Add NULL pointer checks for config.r2h_token before dereferencing
in http.c and http_proxy.c. config.r2h_token is a pointer that can
be NULL when the -T option is not provided, so checking
config.r2h_token[0] directly would crash with a segfault.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 6bc8964 commit ed09c66
2 files changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
| 279 | + | |
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
| |||
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
289 | | - | |
| 290 | + | |
| 291 | + | |
290 | 292 | | |
291 | 293 | | |
292 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
0 commit comments