libosmocore/tests/gsm0808
Oliver Smith c66b35b616 gsm0808_enc_aoip_trasp_addr: add length check
Instead of running into OSMO_ASSERT in msgb_put(), return early if the
msgb is too small. As suggested by Pau in [1].

I would have returned -EMSGSIZE, but the function returns uint8_t.

[1]: https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28582/2#message-a183c463ea20a8d958465ce45a83e62c46214cf6

Change-Id: I632986b99d841abff0f14c6da65f030175f5c4a1
2022-08-05 14:07:55 +00:00
..
gsm0808_test.c gsm0808_enc_aoip_trasp_addr: add length check 2022-08-05 14:07:55 +00:00
gsm0808_test.ok gsm0808_test: Add new unit test showing dec error 2022-03-18 17:36:43 +01:00