Commit 4852a8a
fix: add integer overflow check for malloc in ggml_backend_multi_buffer_alloc_buffer
- Added overflow check before buffers allocation
- Ensures safe memory allocation for multi-buffer operations
- Added proper cleanup on overflow detection
Addresses integer overflow vulnerability (CWE-190)
Co-Authored-By: Jake Cosme <[email protected]>1 parent cc19054 commit 4852a8a
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
607 | 613 | | |
608 | 614 | | |
609 | 615 | | |
| |||
0 commit comments