From 9d839477f85438695bd870898ffa77347e61b637 Mon Sep 17 00:00:00 2001 From: Anderson Lizardo Date: Wed, 17 Sep 2008 16:34:33 +0100 Subject: [PATCH] uwb: Fix handling IEs with empty IE data in uwb_est_get_size() A DRP notification may sometimes have empty IE data. This patch fixes uwb_est_get_size() so that this case is handled properly. Signed-off-by: Anderson Lizardo Signed-off-by: David Vrabel --- drivers/uwb/est.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/uwb/est.c b/drivers/uwb/est.c index 1667afb704d3..3791cd95b63d 100644 --- a/drivers/uwb/est.c +++ b/drivers/uwb/est.c @@ -395,7 +395,7 @@ ssize_t uwb_est_get_size(struct uwb_rc *uwb_rc, struct uwb_est *est, case UWB_EST_8: type_size = sizeof(u8); break; default: BUG(); } - if (offset + type_size >= rceb_size) { + if (offset + type_size > rceb_size) { if (printk_ratelimit()) dev_err(dev, "EST %p 0x%04x/%04x/%04x[%u]: " "not enough data to read extra size\n", -- GitLab