hnbap encode: don't pass 0 as available buffer space

This commit is contained in:
Harald Welte 2015-09-07 22:41:02 +02:00
parent c060b7bf2c
commit 1c1c53ca11
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ struct msgb *hnbap_generate_successful_outcome(
}
rval = aper_encode_to_buffer(&asn_DEF_HNBAP_PDU, &pdu,
msg->data, msgb_length(msg));
msg->data, msgb_tailroom(msg));
if (rval.encoded < 0) {
LOGP(DMAIN, LOGL_ERROR, "Error encoding type %s\n", rval.failed_type->name);
msgb_free(msg);