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:
 <PN3P287MB18296802E1A6C2CD55997BC68B832@PN3P287MB1829.INDP287.PROD.OUTLOOK.COM>
Date: Wed, 30 Apr 2025 09:47:44 +0000
From: Tarang Raval <tarang.raval@...iconsignals.io>
To: Dan Carpenter <dan.carpenter@...aro.org>
CC: Sakari Ailus <sakari.ailus@...ux.intel.com>, Mauro Carvalho Chehab
	<mchehab@...nel.org>, Hans Verkuil <hverkuil@...all.nl>, Shravan Chippa
	<Shravan.Chippa@...rochip.com>, "linux-media@...r.kernel.org"
	<linux-media@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] media: i2c: imx334: uninitialized variable in
 imx334_update_exp_gain()

Hi Dan,

> The "ret" variable is not initialized on the success path.  Set it to
> zero.
>
> Fixes: 7b19b0fc8ac8 ("media: i2c: imx334: Convert to CCI register access helpers")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
>  drivers/media/i2c/imx334.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
> index fc875072f859..846b9928d4e8 100644
> --- a/drivers/media/i2c/imx334.c
> +++ b/drivers/media/i2c/imx334.c
> @@ -536,7 +536,8 @@ static int imx334_update_controls(struct imx334 *imx334,
>  static int imx334_update_exp_gain(struct imx334 *imx334, u32 exposure, u32 gain)
>  {
>         u32 lpfr, shutter;
> -       int ret, ret_hold;
> +       int ret_hold;
> +       int ret = 0;

I think this initialization may not really be necessary.

If all of those cci_write are skipped, then yes, using ret uninitialized 
would be a problem.

However, I don’t see any case where they would be skipped in the 
current implementation.

So, is this initialization really needed?

Best Regards,
Tarang

>         lpfr = imx334->vblank + imx334->cur_mode->height;
>         shutter = lpfr - exposure;
> --
> 2.47.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ