diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-01-02 20:34:17 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-01-02 20:34:17 (GMT) |
commit | 9bcc244de4b2f07e37025d5180fa37bbe6028fa1 (patch) | |
tree | 8a3327c64b48ba5eb4e17615bf59d1c81f352860 /plugins/ropgadgets/helper.c | |
parent | 5db9effac12d781f179e329ea138fb531a5ae2a0 (diff) |
Avoided playing with fire and local variable addresses.
Diffstat (limited to 'plugins/ropgadgets/helper.c')
-rw-r--r-- | plugins/ropgadgets/helper.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/ropgadgets/helper.c b/plugins/ropgadgets/helper.c index ff89e85..c10af6d 100644 --- a/plugins/ropgadgets/helper.c +++ b/plugins/ropgadgets/helper.c @@ -29,6 +29,7 @@ #include <i18n.h> +#include <common/cpp.h> @@ -101,9 +102,11 @@ const phys_t *setup_instruction_sizes_by_default(size_t *count) { const phys_t *result; /* Liste de taille à renvoyer */ - result = (phys_t []){ 1 }; + static const phys_t sizes[] = { 1 }; - *count = 1; + result = sizes; + + *count = ARRAY_SIZE(sizes);; return result; |