Skip to content

Commit 59a2df8

Browse files
authored
Update Base64.sol
1 parent 7e4b037 commit 59a2df8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contracts/utils/Base64.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,24 +185,28 @@ library Base64 {
185185

186186
// Decode each byte in the chunk as a 6 bit block, and align them to form a block of 3 bytes
187187
let a := sub(byte(28, input), 43)
188+
// slither-disable-next-line incorrect-shift
188189
if iszero(and(shl(a, 1), 0xffffffd0ffffffc47ff5)) {
189190
mstore(0, errorSelector)
190191
mstore(4, add(a, 49))
191192
revert(0, 0x24)
192193
}
193194
let b := sub(byte(29, input), 43)
195+
// slither-disable-next-line incorrect-shift
194196
if iszero(and(shl(b, 1), 0xffffffd0ffffffc47ff5)) {
195197
mstore(0, errorSelector)
196198
mstore(4, add(b, 49))
197199
revert(0, 0x24)
198200
}
199201
let c := sub(byte(30, input), 43)
202+
// slither-disable-next-line incorrect-shift
200203
if iszero(and(shl(c, 1), 0xffffffd0ffffffc47ff5)) {
201204
mstore(0, errorSelector)
202205
mstore(4, add(c, 49))
203206
revert(0, 0x24)
204207
}
205208
let d := sub(byte(31, input), 43)
209+
// slither-disable-next-line incorrect-shift
206210
if iszero(and(shl(d, 1), 0xffffffd0ffffffc47ff5)) {
207211
mstore(0, errorSelector)
208212
mstore(4, add(d, 49))

0 commit comments

Comments
 (0)