Can someone help me on what exactly the modifier is doing in this contract and why the message data length is increased by 4?
contract NonPayloadAttackableToken {
modifier onlyPayloadSize(uint size) {
assert(msg.data.length == size + 4);
_;
}
function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) {
// do stuff
}
}