Commit 45e73c5
Prevent attaching to a process with a different architecture
Ensure that the caller and target processes have matching architectures
before proceeding. Attaching to a 64-bit process from a 32-bit process
will fail when using CreateToolhelp32Snapshot, and attempting to attach
to a 32-bit process from a 64-bit process may cause issues during PE
file parsing. To avoid potential errors abort the operation if the
architectures differ.1 parent 075ca65 commit 45e73c5
1 file changed
+32
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
425 | 447 | | |
426 | 448 | | |
427 | 449 | | |
| |||
482 | 504 | | |
483 | 505 | | |
484 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
485 | 517 | | |
486 | 518 | | |
487 | 519 | | |
| |||
0 commit comments