Invoke with empty account slice (bp #13931) (#13940)

* Invoke with empty account slice (#13931)


(cherry picked from commit 1c51711c75)

* nudge ci

Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
mergify[bot]
2020-12-03 09:52:08 -08:00
committed by GitHub
parent e313cf8332
commit f705340971
5 changed files with 97 additions and 46 deletions

View File

@@ -1004,7 +1004,6 @@ impl<'a> SyscallInvokeSigned<'a> for SyscallInvokeSignedC<'a> {
ro_regions,
self.loader_id
)?;
let first_info_addr = &account_infos[0] as *const _ as u64;
let mut accounts = Vec::with_capacity(message.account_keys.len());
let mut refs = Vec::with_capacity(message.account_keys.len());
'root: for account_key in message.account_keys.iter() {
@@ -1032,6 +1031,7 @@ impl<'a> SyscallInvokeSigned<'a> for SyscallInvokeSignedC<'a> {
self.loader_id
)?;
let first_info_addr = &account_infos[0] as *const _ as u64;
let addr = &account_info.data_len as *const u64 as u64;
let vm_addr = account_infos_addr + (addr - first_info_addr);
let _ =