Realloc not supported

This commit is contained in:
Jack May
2020-08-06 02:35:07 -07:00
committed by Michael Vines
parent 1a9aa78129
commit bc4c5c5a97

View File

@ -879,6 +879,12 @@ fn call<'a>(
let account = account.borrow();
if message.is_writable(i) && !account.executable {
*lamport_ref = account.lamports;
if data.len() != account.data.len() {
return Err(SyscallError::InstructionError(
InstructionError::AccountDataSizeChanged,
)
.into());
}
data.clone_from_slice(&account.data);
}
}