From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Thu, 04 Jan 2024 10:08:02 +0000 Subject: [PATCH] disable FB --- kernel/drivers/net/usb/rndis_host.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kernel/drivers/net/usb/rndis_host.c b/kernel/drivers/net/usb/rndis_host.c index 1505fe3..1ff723e 100644 --- a/kernel/drivers/net/usb/rndis_host.c +++ b/kernel/drivers/net/usb/rndis_host.c @@ -255,7 +255,8 @@ off = le32_to_cpu(u.get_c->offset); len = le32_to_cpu(u.get_c->len); - if (unlikely((8 + off + len) > CONTROL_BUFFER_SIZE)) + if (unlikely((off > CONTROL_BUFFER_SIZE - 8) || + (len > CONTROL_BUFFER_SIZE - 8 - off))) goto response_error; if (*reply_len != -1 && len != *reply_len) -- Gitblit v1.6.2