Search Linux Wireless

Re: [patch] ipw2x00: signedness bug handling frame length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 12, 2012 at 09:34:50AM +0300, Dan Carpenter wrote:
> This is basically just a cleanup.  Large positive numbers get counted as
> negative but then get implicitly cast to positive again for the checks
> that matter.
> 
> This does make a small difference in ipw_handle_promiscuous_rx() when we
> test "if (unlikely((len + IPW_RX_FRAME_SIZE) > skb_tailroom(rxb->skb)))"
> It should return there, but we don't return until a couple lines later
> when we test "if (len > IPW_RX_BUF_SIZE - sizeof(struct ipw_rt_hdr)) {".
> The difference is that in the second test the sizeof() means that there
> is an implied cast to unsigned.
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Not sure if making it "unsinged int" would be better, but this change is
fine to me as is too.

Reviewed-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux