Commit af02b68
committed
Fix four new defects discovered
h2_cb_on_header: Instead of passing value + 6 (unbounded) directly to dohd_url64_check/dohd_url64_decode, the code now copies exactly valuelen - strlen(GETDNS) bytes into a stack-local
b64tmp buffer and NUL-terminates it before calling the helpers.
h2_cb_on_frame_recv: Added an is_h2_get field to req_slot, set to 1 when a GET :path payload is successfully decoded. The content-type check now reads (!req->content_type_seen &&
!req->is_h2_get), so valid GET requests aren't rejected with 415.
dohd_new_connection: evquick_addevent's return value is now checked; on failure, the wolfSSL object is freed, the socket closed, and the pool slot returned — preventing socket/memory leaks.
heap_insert: realloc now uses a temporary pointer _tmp; the original heap->top is only overwritten on success, preventing the pointer loss that left the heap in a corrupted state.1 parent e26951c commit af02b68
2 files changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
| |||
620 | 621 | | |
621 | 622 | | |
622 | 623 | | |
| 624 | + | |
623 | 625 | | |
624 | 626 | | |
625 | 627 | | |
| |||
1072 | 1074 | | |
1073 | 1075 | | |
1074 | 1076 | | |
1075 | | - | |
| 1077 | + | |
1076 | 1078 | | |
1077 | 1079 | | |
1078 | 1080 | | |
| |||
1173 | 1175 | | |
1174 | 1176 | | |
1175 | 1177 | | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
1176 | 1182 | | |
1177 | | - | |
| 1183 | + | |
1178 | 1184 | | |
1179 | 1185 | | |
1180 | 1186 | | |
1181 | | - | |
1182 | | - | |
| 1187 | + | |
1183 | 1188 | | |
1184 | 1189 | | |
1185 | 1190 | | |
1186 | 1191 | | |
1187 | 1192 | | |
| 1193 | + | |
1188 | 1194 | | |
1189 | 1195 | | |
1190 | 1196 | | |
| |||
1373 | 1379 | | |
1374 | 1380 | | |
1375 | 1381 | | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
1376 | 1389 | | |
1377 | 1390 | | |
1378 | 1391 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
0 commit comments