Commit 680d493
fix: add null pointer checks for fopen calls in save-load-state.cpp
- Add null checks for all fopen calls before using file pointers
- Prevents null pointer dereference vulnerabilities
Addresses 12 null pointer dereference vulnerabilities (CWE-476)
Co-Authored-By: Jake Cosme <[email protected]>1 parent f231693 commit 680d493
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
| |||
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
| |||
173 | 181 | | |
174 | 182 | | |
175 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
176 | 188 | | |
177 | 189 | | |
178 | 190 | | |
| |||
0 commit comments