On Nov 30, 2011, at 10:15 AM, Dan Carpenter wrote:
> It doesn't actually matter because sizeof(SBSSIDList) is just 4 but
> normally you would do the math different.
> 
>               if (sList.uItem > ULONG_MAX / sizeof(SBSSIDItem) - 
> sizeof(SBSSIDList)) {
> 
> But both checks are low enough in this case.

Just out of curiosity, why do you prefer this form here?

In general, for *alloc(a + x * b), the check

        x > (umax - a) / b

looks more correct to me.

- xi
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to