-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f542046
commit 1ff54db
Showing
6 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'openzeppelin-solidity': patch | ||
--- | ||
|
||
`Base64`: Fix issue where dirty memory located just after the input buffer is affecting the result. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.20; | ||
|
||
import {Base64} from "@openzeppelin/contracts/utils/Base64.sol"; | ||
import {Initializable} from "../proxy/utils/Initializable.sol"; | ||
|
||
contract Base64DirtyUpgradeable is Initializable { | ||
struct A { | ||
uint256 value; | ||
} | ||
|
||
function __Base64Dirty_init() internal onlyInitializing { | ||
} | ||
|
||
function __Base64Dirty_init_unchained() internal onlyInitializing { | ||
} | ||
function encode(bytes memory input) public pure returns (string memory) { | ||
A memory unused = A({value: type(uint256).max}); | ||
// To silence warning | ||
unused; | ||
|
||
return Base64.encode(input); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule openzeppelin-contracts
updated
5 files
+5 −0 | .changeset/warm-geese-dance.md | |
+19 −0 | contracts/mocks/Base64Dirty.sol | |
+18 −9 | contracts/utils/Base64.sol | |
+2 −2 | package-lock.json | |
+11 −1 | test/utils/Base64.test.js |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters