Repository navigation
Commit 2e1b7bf
moe_trace: create the trace file 0644 and fail if it cannot be written
CodeQL cpp/world-writable-file-creation (alert 5): fopen("w") creates with
0666 and leaves the rest to the umask. Open with an explicit 0644, and stop
with a message instead of writing through a null FILE* when the path is bad.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent f346e69 commit 2e1b7bf
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
228 | 230 | | |
229 | 231 | | |
230 | 232 | | |
231 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
232 | 238 | | |
233 | 239 | | |
234 | 240 | | |
| |||
0 commit comments