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
This commit is contained in:
parent
1bdb132b43
commit
52f882e8c4
|
@ -1285,6 +1285,8 @@ int pcu_rx(struct gsm_pcu_if *pcu_prim, size_t pcu_prim_length)
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue