trxcon: fix potential buffer overflow in l1ctl_proc_est_req_h1()

Change-Id: I10f03ca66412a4a7094b0f4a7319411d5d5818ef
This commit is contained in:
Vadim Yanitskiy 2020-05-28 18:51:11 +07:00 committed by fixeria
parent b0b42332df
commit f8a3959cb2
1 changed files with 3 additions and 0 deletions

View File

@ -606,6 +606,9 @@ static int l1ctl_proc_est_req_h1(struct trx_instance *trx, struct l1ctl_h1 *h)
if (!h->n) {
LOGP(DL1C, LOGL_ERROR, "No channels in mobile allocation?!?\n");
return -EINVAL;
} else if (h->n > ARRAY_SIZE(ma)) {
LOGP(DL1C, LOGL_ERROR, "More than 64 channels in mobile allocation?!?\n");
return -EINVAL;
}
/* Convert from network to host byte order */