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
memory
bytes are copied tostorage
bytes. - The
storage
bytes are extended using.push()
. Because of the compiler bug, a non-zero byte is possibly appended to thestorage
bytes.
Parameters#
The detector does not accept any additional parameters.