Commit 52f5f1f
committed
fix(security): prevent integer overflow in disk metrics collection
- Add validation to ensure block size is positive before int64->uint64 conversion
- Return error for invalid block sizes to prevent overflow issues
- Resolves gosec G115 integer overflow warning in metrics_collector.go:425
Fixes integer overflow security vulnerability detected by gosec scan.1 parent bb07b18 commit 52f5f1f
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
425 | 430 | | |
426 | 431 | | |
427 | 432 | | |
| |||
0 commit comments