Copying an empty byte array (or string) from memory or calldata to storage can result in data corruption if the target array's length is increased subsequently without storing new data. This is due to a compiler bug fixed in v0.7.4
. (see here)
- Empty Byte Array Copy
- Memory/Calldata -> Storage
- Increase Length -> No New Data -> Corruption
- Compiler Bug Fixed 0.7.4