ranap_msg_factory: use OCTET_STRING_fromBuf() in ranap_new_msg_dt()
When using asn1c, we cannot use buffers allocated elsewhere and/or on the stack as input into encoding.
This commit is contained in:
parent
ea98b6f6d6
commit
57d873392c
|
@ -180,8 +180,7 @@ struct msgb *ranap_new_msg_dt(uint8_t sapi, const uint8_t *nas, unsigned int nas
|
|||
else
|
||||
ies.sapi = RANAP_SAPI_sapi_0;
|
||||
|
||||
ies.nas_pdu.buf = (uint8_t *) nas;
|
||||
ies.nas_pdu.size = nas_len;
|
||||
OCTET_STRING_fromBuf(&ies.nas_pdu, nas, nas_len);
|
||||
|
||||
/* ies -> dt */
|
||||
rc = ranap_encode_directtransferies(&dt, &ies);
|
||||
|
|
Loading…
Reference in New Issue