fix: test-ranap.c: missing NULL init
The decoding target pointer has to be NULL so that a new structure is allocated by aper_decode(). Fixes a probable segmentation fault upon decoding at test-ranap.c:77 or free of unallocated memory in test-ranap.c:81.
This commit is contained in:
parent
75f8116132
commit
802acd0da4
|
@ -57,7 +57,7 @@ static void test_aper_int(uint32_t inp)
|
|||
static void test_aper_causemisc(uint32_t inp, uint8_t exp_enc)
|
||||
{
|
||||
RANAP_Cause_t c = { .present = RANAP_Cause_PR_misc, .choice.misc = inp };
|
||||
RANAP_Cause_t *c_dec;
|
||||
RANAP_Cause_t *c_dec = NULL;
|
||||
asn_enc_rval_t rv;
|
||||
uint8_t buf[32];
|
||||
|
||||
|
|
Loading…
Reference in New Issue