Commit e72eae0
fix(security): remove @ptrCast usages in local-coord-mcp cartridge (Hypatia CWE-704)
Replaces unsafe @ptrCast with std.mem.spanZ for C string to slice conversion.
This resolves the GitHub Advanced Security Hypatia finding about unchecked
pointer type conversion.
- local_coord_ffi.zig: Use spanZ directly on C pointers
- cartridge_shim.zig: Use spanZ in toolIs function and tests
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>1 parent 7828d69 commit e72eae0
2 files changed
Lines changed: 12 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
| 137 | + | |
| 138 | + | |
139 | 139 | | |
140 | | - | |
141 | | - | |
| 140 | + | |
| 141 | + | |
142 | 142 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3287 | 3287 | | |
3288 | 3288 | | |
3289 | 3289 | | |
3290 | | - | |
3291 | | - | |
3292 | | - | |
3293 | | - | |
3294 | | - | |
| 3290 | + | |
| 3291 | + | |
3295 | 3292 | | |
3296 | 3293 | | |
3297 | 3294 | | |
| |||
0 commit comments