Tag: 6057912d7baad31be9819518674ffad349a065b1

drivers/net/usb: Correct code taking the size of a pointer

Author: Julia Lawall <julia@diku.dk> sizeof(dev->dev_addr) is the size of a pointer. A few lines above, the size of this field is obtained using netdev->addr_len for a call to memcpy, so do the same here. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression *x; expression f; …

Continue reading