fix pcu_rx(): actually discard malformed container message
Currently we do log an error, but then still call pcu_rx_container(),
passing it a malformed message. The function does have an additional
length check inside, but let's better discard it early.
Change-Id: I8410ecf35442ab75741a5c9cd29d640ce5508e57
Related: OS#5963
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index bbeb3aa..577ba57 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -1285,6 +1285,8 @@
if (pcu_prim_length < exp_len) {
LOGP(DL1IF, LOGL_ERROR, "Received %zu bytes on PCU Socket, but primitive container size" \
"is %zu, discarding\n", pcu_prim_length, exp_len);
+ rc = -EINVAL;
+ break;
}
rc = pcu_rx_container(bts, &pcu_prim->u.container);
break;