Commit 8561a0f7 authored by Cedric Roux's avatar Cedric Roux

asn1: properly initialize variables for uper_decode() and aper_decode()

parent f8f9f8ac
......@@ -647,7 +647,7 @@ int main(int argc, char **argv)
AssertFatal(scg_fd != NULL,"no reconfig.raw file\n");
char buffer[1024];
int msg_len=fread(buffer,1,1024,scg_fd);
NR_RRCReconfiguration_t *NR_RRCReconfiguration;
NR_RRCReconfiguration_t *NR_RRCReconfiguration = NULL;
printf("Decoding NR_RRCReconfiguration (%d bytes)\n",msg_len);
asn_dec_rval_t dec_rval = uper_decode_complete( NULL,
......@@ -667,7 +667,7 @@ int main(int argc, char **argv)
AssertFatal(NR_RRCReconfiguration->criticalExtensions.present == NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration,"wrong NR_RRCReconfiguration->criticalExstions.present type\n");
NR_RRCReconfiguration_IEs_t *reconfig_ies = NR_RRCReconfiguration->criticalExtensions.choice.rrcReconfiguration;
NR_CellGroupConfig_t *secondaryCellGroup;
NR_CellGroupConfig_t *secondaryCellGroup = NULL;
dec_rval = uper_decode_complete( NULL,
&asn_DEF_NR_CellGroupConfig,
(void **)&secondaryCellGroup,
......
......@@ -277,7 +277,7 @@ static void fill_qos(NGAP_QosFlowSetupRequestList_t *qos, pdusession_t *session)
static int decodePDUSessionResourceSetup(pdusession_t *session)
{
NGAP_PDUSessionResourceSetupRequestTransfer_t *pdusessionTransfer;
NGAP_PDUSessionResourceSetupRequestTransfer_t *pdusessionTransfer = NULL;
for (int i=0; i<session->pdusessionTransfer.length; i++)
printf("%02x:",session->pdusessionTransfer.buffer[i]);
printf("\n");
......@@ -852,7 +852,7 @@ static void fill_qos2(NGAP_QosFlowAddOrModifyRequestList_t *qos, pdusession_t *s
static void decodePDUSessionResourceModify(pdusession_t *param, const ngap_pdu_t pdu)
{
NGAP_PDUSessionResourceModifyRequestTransfer_t *pdusessionTransfer;
NGAP_PDUSessionResourceModifyRequestTransfer_t *pdusessionTransfer = NULL;
asn_dec_rval_t dec_rval = aper_decode(NULL, &asn_DEF_NGAP_PDUSessionResourceModifyRequestTransfer, (void **)&pdusessionTransfer, pdu.buffer, pdu.length, 0, 0);
if (dec_rval.code != RC_OK) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment