fixeria submitted this change.
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
---
M src/host/layer23/src/mobile/gsm48_mm.c
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c
index ee457ad..fad475e 100644
--- a/src/host/layer23/src/mobile/gsm48_mm.c
+++ b/src/host/layer23/src/mobile/gsm48_mm.c
@@ -2613,7 +2613,7 @@
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;
To view, visit change 35602. To unsubscribe, or for help writing mail filters, visit settings.