Commit c1b1d82d authored by Paragon Initiative Enterprises's avatar Paragon Initiative Enterprises
Browse files

Off-by-one error

No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
...@@ -197,7 +197,7 @@ abstract class Base32 implements EncoderInterface ...@@ -197,7 +197,7 @@ abstract class Base32 implements EncoderInterface
} }
if (($srcLen & 7) === 0) { if (($srcLen & 7) === 0) {
for ($j = 0; $j < 7 && $j < $srcLen; ++$j) { for ($j = 0; $j < 7 && $j < $srcLen; ++$j) {
if ($encodedString[$srcLen - $j] === '=') { if ($encodedString[$srcLen - $j - 1] === '=') {
throw new InvalidArgumentException( throw new InvalidArgumentException(
"decodeNoPadding() doesn't tolerate padding" "decodeNoPadding() doesn't tolerate padding"
); );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment