Skip to content

Commit

Permalink
flamenco: add executable check in program cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kbhargava-jump committed Oct 21, 2024
1 parent 1c64e08 commit f13b7de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/flamenco/runtime/program/fd_bpf_program_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ fd_bpf_create_bpf_program_cache_entry( fd_exec_slot_ctx_t * slot_ctx,
program account can't be deserialized then it is also intentionally not
added to the program blacklist. */

if( !fd_account_is_executable( program_acc->const_meta ) ) {
return -1;
}

int res;
if( !memcmp( program_acc->const_meta->info.owner, fd_solana_bpf_loader_upgradeable_program_id.key, sizeof(fd_pubkey_t) ) ) {
res = fd_bpf_get_executable_program_content_for_upgradeable_loader( slot_ctx, program_acc, &program_data, &program_data_len );
Expand Down

0 comments on commit f13b7de

Please sign in to comment.