fixup: mobile: always check return value of tlv_parse()

Fix a regression: check if Location Area Information IE fits.

Change-Id: I51e2ae1be1c51a6359f8b0faad56f654251f1413
Fixes: bb0ac02e "mobile: always check return value of tlv_parse()"
Fixes: CID#341618
This commit is contained in:
Vadim Yanitskiy 2024-01-17 04:42:59 +07:00
parent 5a1d79e587
commit 1f0ce9c9ab
1 changed files with 1 additions and 1 deletions

View File

@ -2613,7 +2613,7 @@ static int gsm48_mm_rx_loc_upd_acc(struct osmocom_ms *ms, struct msgb *msg)
struct tlv_parsed tp;
struct msgb *nmsg;
if (payload_len < 0) {
if (payload_len < sizeof(*lai)) {
short_read:
LOGP(DMM, LOGL_ERROR, "Short read of LOCATION UPDATING ACCEPT message\n");
return -EINVAL;