Commit 6a19a59
authored
pe: Reject cyclic resource trees (#499)
Parsing these currently results in a hang. This follows the approach
taken by the LIEF PE parser. Others like `trailofbits/pe-parse` strictly
limit the resource tree depth to 3 instead (which is the max seen in the
wild) to side-step this problem.1 parent 75479d4 commit 6a19a59
File tree
2 files changed
+21
-0
lines changed- src/pe
- tests/bins/pe
2 files changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
402 | 406 | | |
403 | 407 | | |
404 | 408 | | |
405 | 409 | | |
406 | 410 | | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
407 | 420 | | |
408 | 421 | | |
409 | 422 | | |
| |||
1285 | 1298 | | |
1286 | 1299 | | |
1287 | 1300 | | |
| 1301 | + | |
| 1302 | + | |
1288 | 1303 | | |
1289 | 1304 | | |
1290 | 1305 | | |
| |||
1916 | 1931 | | |
1917 | 1932 | | |
1918 | 1933 | | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
1919 | 1940 | | |
Binary file not shown.
0 commit comments