Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35791?usp=email )
Change subject: abis_nm: fix -Wunused-but-set-variable (bug) ......................................................................
Patch Set 2:
(1 comment)
File src/osmo-bsc/abis_nm.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/35791/comment/c3b69e51_2e3703b5 PS2, Line 2168: const uint8_t *attr, int attr_len)
what about converting attr_len to 0? it makes no sense to have a negative len to start with....
This function gets `attr` / `attr_len` from an non-trusted source (received OML message). The `attr_len` is calculated as follows: `oh->length - sizeof(*foh)`, so we may end up with a negative number and this is why I am additionally checking this. If we change to unsigned, a negative number would turn into a huge number passing all our size checks.