rspro_util.c: Fix encoding to msgb. Use tailroom, not length!

Change-Id: I955b76499b1370a9453a50204ccee0e9e8769468
This commit is contained in:
Harald Welte 2018-08-17 22:06:24 +02:00
parent 57555aa60c
commit 6b8d4f82de
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ struct msgb *rspro_enc_msg(RsproPDU_t *pdu)
if (!msg)
return NULL;
rval = der_encode_to_buffer(&asn_DEF_RsproPDU, pdu, msgb_data(msg), msgb_length(msg));
rval = der_encode_to_buffer(&asn_DEF_RsproPDU, pdu, msgb_data(msg), msgb_tailroom(msg));
if (rval.encoded < 0) {
return NULL;
}