Commit c807e24
authored
fix: remove TOCTOU race in RunState.load (#3839)
Remove exists() check before open() and catch FileNotFoundError directly.
This prevents a race where the file is deleted between check and open,
while preserving the descriptive error message.1 parent 56aec8a commit c807e24
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
743 | 743 | | |
744 | 744 | | |
745 | 745 | | |
746 | | - | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
747 | 751 | | |
748 | 752 | | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | 753 | | |
753 | 754 | | |
754 | 755 | | |
| |||
0 commit comments