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:
Neels Hofmeyr 2016-05-03 13:11:40 +02:00
parent 75f8116132
commit 802acd0da4
1 changed files with 1 additions and 1 deletions

View File

@ -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];