diff options
author | Roland Schatz <roland.schatz@oracle.com> | 2022-05-24 03:04:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 21:04:43 -0400 |
commit | de95947ae5db07e4589bb16bab30b6c8ba2b3106 (patch) | |
tree | 2f09c852dba3076494342dfc337c08fcd3906576 /src/prep_cif.c | |
parent | 92d77d0e87a5f2a8c9c9b2431ffd264cb664e17a (diff) | |
download | libffi-de95947ae5db07e4589bb16bab30b6c8ba2b3106.tar.gz |
Fix check for invalid varargs arguments. (#707)
Diffstat (limited to 'src/prep_cif.c')
-rw-r--r-- | src/prep_cif.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/prep_cif.c b/src/prep_cif.c index c1832b1..2d0f252 100644 --- a/src/prep_cif.c +++ b/src/prep_cif.c @@ -1,6 +1,7 @@ /* ----------------------------------------------------------------------- prep_cif.c - Copyright (c) 2011, 2012, 2021 Anthony Green Copyright (c) 1996, 1998, 2007 Red Hat, Inc. + Copyright (c) 2022 Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -240,7 +241,7 @@ ffi_status ffi_prep_cif_var(ffi_cif *cif, if (rc != FFI_OK) return rc; - for (i = 1; i < ntotalargs; i++) + for (i = nfixedargs; i < ntotalargs; i++) { ffi_type *arg_type = atypes[i]; if (arg_type == &ffi_type_float |