Commit 1ab01a0
fix: add integer overflow check for calloc in ggml_build_backward_expand
- Added overflow check before calloc operation
- Prevents integer overflow in gradient computation
- Ensures safe memory allocation for grads_needed array
Addresses integer overflow vulnerability (CWE-190)
Co-Authored-By: Jake Cosme <[email protected]>1 parent aefd843 commit 1ab01a0
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6386 | 6386 | | |
6387 | 6387 | | |
6388 | 6388 | | |
| 6389 | + | |
| 6390 | + | |
| 6391 | + | |
| 6392 | + | |
6389 | 6393 | | |
6390 | 6394 | | |
6391 | 6395 | | |
| |||
0 commit comments