SWC-102/过期的编译器版本
使用过时的编译器版本可能会出现问题,尤其在所使用的编译器版本存在公开影响的错误和问题的情况下。
CWE漏洞分类
整改方案
建议使用Solidity编译器的最新版本。
参考文献
缺陷合约示例
version_0_4_13.sol
pragma solidity 0.4.13;
contract OutdatedCompilerVersion {
uint public x = 1;
}
version_0_4_13.yaml
description: Test for outdated Solidity compiler
issues:
- id: SWC-102
count: 1
locations:
- bytecode_offsets: {}
line_numbers:
version_0_4_13.sol: [1]