Skip to content

Commit

Permalink
uwb: Fix handling IEs with empty IE data in uwb_est_get_size()
Browse files Browse the repository at this point in the history
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 <anderson.lizardo@indt.org.br>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
  • Loading branch information
Anderson Lizardo authored and David Vrabel committed Sep 17, 2008
1 parent b0a8132 commit 9d83947
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/uwb/est.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9d83947

Please sign in to comment.