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]
Date:   Wed, 15 Feb 2017 10:26:10 -0500 (EST)
From:   Alan Stern <stern@...land.harvard.edu>
To:     "Gustavo A. R. Silva" <garsilva@...eddedor.com>
cc:     oneukum@...e.com, <gregkh@...uxfoundation.org>,
        <linux-usb@...r.kernel.org>,
        <usb-storage@...ts.one-eyed-alien.net>,
        <linux-kernel@...r.kernel.org>,
        Peter Senna Tschudin <peter.senna@...il.com>
Subject: Re: [usb-storage] [PATCH] usb: storage: add missing pre-increment
 to variable

On Wed, 15 Feb 2017, Gustavo A. R. Silva wrote:

> Add missing pre-increment to 'waitcount' variable used in do-while loop.
> 
> Addresses-Coverity-ID: 1011631
> Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>
> ---
>  drivers/usb/storage/jumpshot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.c
> index 011e527..a26c4bb 100644
> --- a/drivers/usb/storage/jumpshot.c
> +++ b/drivers/usb/storage/jumpshot.c
> @@ -313,7 +313,7 @@ static int jumpshot_write_data(struct us_data *us,
>  				//
>  				msleep(50); 
>  			}
> -		} while ((result != USB_STOR_TRANSPORT_GOOD) && (waitcount < 10));
> +		} while ((result != USB_STOR_TRANSPORT_GOOD) && (++waitcount < 10));
>  
>  		if (result != USB_STOR_TRANSPORT_GOOD)
>  			usb_stor_dbg(us, "Gah!  Waitcount = 10.  Bad write!?\n");
> 

This has already been reported and fixed.  See

	http://marc.info/?l=linux-usb&m=148604164024557&w=2

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ