mirror of
https://github.com/partic2/libffi
synced 2026-11-10 18:17:19 +00:00
Merge pull request #261 from tromey/fix-260
Don't dereference "ecif" before NULL check
This commit is contained in:
@@ -46,12 +46,12 @@ void ffi_prep_args(void* stack, extended_cif* ecif)
|
|||||||
void** p_argv;
|
void** p_argv;
|
||||||
void* stack_args_p = stack;
|
void* stack_args_p = stack;
|
||||||
|
|
||||||
p_argv = ecif->avalue;
|
|
||||||
|
|
||||||
if (ecif == NULL || ecif->cif == NULL) {
|
if (ecif == NULL || ecif->cif == NULL) {
|
||||||
return; /* no description to prepare */
|
return; /* no description to prepare */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p_argv = ecif->avalue;
|
||||||
|
|
||||||
if ((ecif->cif->rtype != NULL) &&
|
if ((ecif->cif->rtype != NULL) &&
|
||||||
(ecif->cif->rtype->type == FFI_TYPE_STRUCT))
|
(ecif->cif->rtype->type == FFI_TYPE_STRUCT))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user