lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DB02265B3@AcuExch.aculab.com>
Date:   Wed, 23 Nov 2016 12:49:41 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Alexey Dobriyan' <adobriyan@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH] net: fix bogus cast in skb_pagelen() and use unsigned
 variables

From: Alexey Dobriyan
> Sent: 19 November 2016 01:08
...
> -	for (i = (int)skb_shinfo(skb)->nr_frags - 1; i >= 0; i--)
> +	for (i = skb_shinfo(skb)->nr_frags - 1; (int)i >= 0; i--)
>  		len += skb_frag_size(&skb_shinfo(skb)->frags[i]);

Think I'd use:
	for (i = skb_shinfo(skb)->nr_frags; i-- != 0; )

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ