Commit 9e101f1
fix: add path validation for tokenize and quantize file operations (PT vulnerabilities)
- tokenize.cpp: Validate file path before opening
- quantize.cpp: Validate imatrix and input file paths before operations
Addresses C++ path traversal vulnerabilities (CWE-23)
Co-Authored-By: Jake Cosme <[email protected]>1 parent eeb897e commit 9e101f1
2 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
152 | 156 | | |
153 | | - | |
| 157 | + | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| |||
577 | 581 | | |
578 | 582 | | |
579 | 583 | | |
580 | | - | |
581 | 584 | | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
582 | 589 | | |
583 | 590 | | |
584 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | | - | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
0 commit comments