Skip to content

Commit 859e1bf

Browse files
committed
add constraint that i should be between 0 and 65535
1 parent 0391e06 commit 859e1bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

shared/util/codeql/util/Numbers.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ private int toHex(string hex) {
105105
*/
106106
bindingset[i]
107107
string to4digitHex(int i) {
108+
i >= 0 and
109+
i <= 65535 and
108110
result =
109111
"0123456789abcdef".charAt(i.bitShiftRight(12).bitAnd(15)) +
110112
"0123456789abcdef".charAt(i.bitShiftRight(8).bitAnd(15)) +

0 commit comments

Comments
 (0)