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] [day] [month] [year] [list]
Message-ID: <99e4aff6-9ad2-4cea-9e78-a238eb349709@xs4all.nl>
Date: Fri, 25 Apr 2025 11:07:56 +0200
From: Hans Verkuil <hverkuil@...all.nl>
To: Michael Chang <zhang971090220@...il.com>, kwliu@...oton.com,
 kflin@...oton.com, mchehab@...nel.org
Cc: linux-media@...r.kernel.org, openbmc@...ts.ozlabs.org,
 linux-kernel@...r.kernel.org
Subject: Re: [RESEND] media: nuvoton: npcm-video: Prevent returning
 unsupported resolutions

On 08/04/2025 07:54, Michael Chang wrote:
> To restrict the returned resolution due to Nuvoton SoC hardware
> limitations.
> 
> Signed-off-by: Michael Chang <zhang971090220@...il.com>

Just for future reference: please don't resend. If it is in
https://patchwork.linuxtv.org/ then it will be picked up eventually.

Regards,

	Hans

> ---
>  drivers/media/platform/nuvoton/npcm-video.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/nuvoton/npcm-video.c b/drivers/media/platform/nuvoton/npcm-video.c
> index 234fdec04f74..8d6d51a674a3 100644
> --- a/drivers/media/platform/nuvoton/npcm-video.c
> +++ b/drivers/media/platform/nuvoton/npcm-video.c
> @@ -578,7 +578,7 @@ static unsigned int npcm_video_hres(struct npcm_video *video)
>  	regmap_read(gfxi, HVCNTL, &hvcntl);
>  	apb_hor_res = (((hvcnth & HVCNTH_MASK) << 8) + (hvcntl & HVCNTL_MASK) + 1);
>  
> -	return apb_hor_res;
> +	return (apb_hor_res > MAX_WIDTH) ? MAX_WIDTH : apb_hor_res;
>  }
>  
>  static unsigned int npcm_video_vres(struct npcm_video *video)
> @@ -591,7 +591,7 @@ static unsigned int npcm_video_vres(struct npcm_video *video)
>  
>  	apb_ver_res = (((vvcnth & VVCNTH_MASK) << 8) + (vvcntl & VVCNTL_MASK));
>  
> -	return apb_ver_res;
> +	return (apb_ver_res > MAX_HEIGHT) ? MAX_HEIGHT : apb_ver_res;
>  }
>  
>  static int npcm_video_capres(struct npcm_video *video, unsigned int hor_res,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ