Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28582 )
Change subject: bssap_conn: fix missing length check ......................................................................
Patch Set 3:
(3 comments)
File src/osmo-bsc-nat/bssap_conn.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28582/comment/0f4f4161_fd9bcc59 PS3, Line 56: enc_err = gsm0808_enc_aoip_trasp_addr(msg_new, ss) == 0;
Better add paraenthesis it's clearer: enc_err = (gsm0808_enc_aoip_trasp_addr(msg_new, ss) == 0);
Ack
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28582/comment/62a2abef_933eddee PS3, Line 61: enc_err = tlv_encode_one(msg_new, def->def[tag].type, tag, len_v, val) < 0;
Same, paranthesis, otherwise it's easy tonot see the comparision at the end (it happened to me).
Ack
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28582/comment/9ee0768e_1b093a1a PS3, Line 64: if (enc_err) {
BTW, this looks to me a like a good candidate for goto. […]
Done