diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-03-25 09:43:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-03-25 09:43:57 (GMT) |
commit | 8e275f286138db88140d1643d1008f130ba7f484 (patch) | |
tree | eea120992ae5a9c2a341e3bee336620ecdc65a6f /src/arch | |
parent | fd0df8f884336fc69bd0938453f9712c166f08c8 (diff) |
Avoided stack overflows with empty dynamic parameters.
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/target.c | 4 | ||||
-rw-r--r-- | src/arch/vmpa.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/arch/target.c b/src/arch/target.c index d3bd89a..db4d058 100644 --- a/src/arch/target.c +++ b/src/arch/target.c @@ -274,8 +274,8 @@ static int g_target_operand_compare(const GTargetOperand *a, const GTargetOperan } else if (a->symbol != NULL && b->symbol != NULL) { - result = g_binary_symbol_cmp((const GBinSymbol * []) { a->symbol }, - (const GBinSymbol * []) { b->symbol }); + result = g_binary_symbol_cmp((const GBinSymbol *[]) { a->symbol }, + (const GBinSymbol *[]) { b->symbol }); if (result != 0) goto gtoc_done; } diff --git a/src/arch/vmpa.h b/src/arch/vmpa.h index d2cc39b..fc997e5 100644 --- a/src/arch/vmpa.h +++ b/src/arch/vmpa.h @@ -176,6 +176,9 @@ typedef struct _mrange_t } mrange_t; +#define UNUSED_MRANGE_PTR (mrange_t []) { { { 0 }, 0 } } + + #define get_mrange_addr(r) &(r)->addr #define get_mrange_length(r) (r)->length |