Commit eec1814
fix: null function pointer crash in enumerate_dirs — root cause of silent BOF crashes
enumerate_dirs() called with NULL callback at triage.c:357, but never
checked for NULL before calling callback(). When subdirectories existed
under C:\Users\{user}\AppData\Roaming\Microsoft\Protect, this caused
an immediate null pointer dereference crash.
Fixes:
- Add 'if (callback)' guard to all 4 callback call sites in
enumerate_files() and enumerate_dirs()
- Remove useless enumerate_dirs(mk_path, NULL, NULL) call1 parent a472f49 commit eec1814
1 file changed
+4
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | 356 | | |
360 | 357 | | |
361 | 358 | | |
| |||
0 commit comments