Skip to content

Commit

Permalink
added some extra check
Browse files Browse the repository at this point in the history
  • Loading branch information
aodinokov committed Aug 15, 2024
1 parent 53b71ae commit 7b531c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/c_ffi_call/value_ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ static int _val_to_ffi_type(metac_entry_t * p_entry, ffi_type ** pp_rtype) {
memcpy(p_tmp->elements[memb_id], &_ffi_type_, sizeof(ffi_type)); \
delta -= sizeof(_type_size_); \
++memb_id; \
if (memb_id == memb_count+1) { \
/* this must not happen */ \
free(p_tmp->elements); \
free(p_tmp); \
return -(EFAULT); \
} \
continue; \
}
_process_(long long, ffi_type_slong);
Expand Down

0 comments on commit 7b531c0

Please sign in to comment.