ipaccess-config: check value returned by abis_nm_tlv_parse()

Change-Id: I38cd35506964efb1441555d16cea998f415e9394
Fixes: CID#272995
This commit is contained in:
Vadim Yanitskiy 2022-06-28 18:18:02 +07:00
parent 9a5bca0b0e
commit a12cc72fcd
1 changed files with 4 additions and 1 deletions

View File

@ -286,7 +286,10 @@ static int print_attr_rep(struct msgb *mb)
unsigned int indent = 0;
abis_nm_tlv_parse(&tp, bts, foh->data, oh->length-sizeof(*foh));
if (abis_nm_tlv_parse(&tp, bts, foh->data, oh->length-sizeof(*foh)) < 0) {
LOGPFOH(DNM, LOGL_ERROR, foh, "%s(): tlv_parse failed\n", __func__);
return -EINVAL;
}
abis_nm_tlv_attr_primary_oml(&tp, &ia, &oml_port);
osmo_strlcpy(oml_ip, inet_ntoa(ia), sizeof(oml_ip));