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

Change-Id: I955b76499b1370a9453a50204ccee0e9e8769468
laforge/bankd-fsm-mistake
Harald Welte 5 years ago
parent 57555aa60c
commit 6b8d4f82de
  1. 2
      src/rspro_util.c

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

Loading…
Cancel
Save