layer23/l1ctl.c: fix: verify msg length against l1ctl_hdr
In l1ctl_recv() we actually expect to 'see' the L1CTL header instead of the DL info header. Let's fix this. Change-Id: Ic7d017bef04f3c186565d5dade36959df1019bd8
This commit is contained in:
parent
5746125696
commit
7c04a6066e
|
@ -873,9 +873,8 @@ int l1ctl_recv(struct osmocom_ms *ms, struct msgb *msg)
|
|||
{
|
||||
int rc = 0;
|
||||
struct l1ctl_hdr *l1h;
|
||||
struct l1ctl_info_dl *dl;
|
||||
|
||||
if (msgb_l2len(msg) < sizeof(*dl)) {
|
||||
if (msgb_l2len(msg) < sizeof(*l1h)) {
|
||||
LOGP(DL1C, LOGL_ERROR, "Short Layer2 message: %u\n",
|
||||
msgb_l2len(msg));
|
||||
msgb_free(msg);
|
||||
|
|
Loading…
Reference in New Issue