Commit e389227
committed
Merged PR 15134783: Fix comparison with wider type in mldsa_primitives.c
This was found by CodeQL:
> Comparison with wider type at mldsa_primitives.c:792. A loop variable or comparison operand is implicitly widened, potentially causing CWE-190/197/835.
It's not an issue in practice as the max loop bound is `7*8=56` for the largest ML-DSA parameter set, and this is also checked by assertions. However, it's easy to fix the issue by changing to `UINT32`.
Related work items: #605925571 parent 88bdeee commit e389227
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
782 | | - | |
783 | 782 | | |
784 | 783 | | |
785 | 784 | | |
| |||
789 | 788 | | |
790 | 789 | | |
791 | 790 | | |
792 | | - | |
| 791 | + | |
793 | 792 | | |
794 | 793 | | |
795 | 794 | | |
| |||
0 commit comments