Skip to content

Instantly share code, notes, and snippets.

@ernestognw
Created May 5, 2023 13:50
Show Gist options
  • Save ernestognw/2c92632f42ba27264e04c6b1592dd7d2 to your computer and use it in GitHub Desktop.
Save ernestognw/2c92632f42ba27264e04c6b1592dd7d2 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract Uninitialized {
address public owner;
constructor() {
owner = msg.sender;
}
struct St {
address a;
}
function test() external {
bad();
}
function bad() internal returns (St storage ret) {
ret = ret;
ret.a = address(0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment