Empty byte array copy bug detector#
Name: empty-byte-array-copy-bug
Reports a possibility of triggering a compiler bug when copying empty calldata or memory bytes to storage bytes and then extending the storage bytes using .push().
See the bug announcement for more details.
The bug was fixed in Solidity 0.7.4.
Example#
- Empty
memorybytes are copied tostoragebytes. - The
storagebytes are extended using.push(). Because of the compiler bug, a non-zero byte is possibly appended to thestoragebytes.
Parameters#
The detector does not accept any additional parameters.