Commit 3454a53
fix(danger): use correct bit size for octal escape parsing
CodeQL flagged incorrect type conversion: strconv.ParseUint was parsing
into a 16-bit target (8, 16) then casting to uint8 without bounds checking.
Since octal escapes in bash are always mod 256 (fit in uint8), parse
directly as 8-bit (8, 8) to ensure the conversion is safe and eliminate
the CodeQL warning.
All tests pass including TestHardening_ANSICOctalDigitCap.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>1 parent 620b683 commit 3454a53
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
890 | | - | |
| 890 | + | |
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
| |||
0 commit comments