]> Pileus Git - ~andy/linux/commitdiff
uwb: Fix handling IEs with empty IE data in uwb_est_get_size()
authorAnderson Lizardo <anderson.lizardo@indt.org.br>
Wed, 17 Sep 2008 15:34:33 +0000 (16:34 +0100)
committerDavid Vrabel <dv02@dv02pc01.europe.root.pri>
Wed, 17 Sep 2008 15:54:32 +0000 (16:54 +0100)
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>
drivers/uwb/est.c

index 1667afb704d3ea8bdb66e724bbcef2913c742d53..3791cd95b63d39e191f47bbd04f02e5983121d1b 100644 (file)
@@ -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",