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:	Fri, 4 Apr 2014 13:49:45 +0300
From:	Tomi Valkeinen <tomi.valkeinen@...com>
To:	<jon@...gle.org>, <linux-kernel@...r.kernel.org>,
	<linux-fbdev@...r.kernel.org>
CC:	<plagnioj@...osoft.com>, Jon Ringle <jringle@...dpoint.com>,
	"Etheridge, Darren" <detheridge@...com>
Subject: Re: [PATCH v3 2/2] video: da8xx-fb: Fix casting of info->pseudo_palette

On 01/04/14 15:39, jon@...gle.org wrote:
> From: Jon Ringle <jringle@...dpoint.com>
> 
> The casting to (u16 *) on info->pseudo_palette is wrong and causes the
> display to show a blue (garbage) vertical line on every other pixel column
> 
> Signed-off-by: Jon Ringle <jringle@...dpoint.com>
> ---
>  drivers/video/da8xx-fb.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
> index 233f65f..c17f901 100644
> --- a/drivers/video/da8xx-fb.c
> +++ b/drivers/video/da8xx-fb.c
> @@ -678,15 +678,7 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
>  			(green << info->var.green.offset) |
>  			(blue << info->var.blue.offset);
>  
> -		switch (info->var.bits_per_pixel) {
> -		case 16:
> -			((u16 *) (info->pseudo_palette))[regno] = v;
> -			break;
> -		case 24:
> -		case 32:
> -			((u32 *) (info->pseudo_palette))[regno] = v;
> -			break;
> -		}
> +		((u32 *) (info->pseudo_palette))[regno] = v;
>  		if (palette[0] != 0x4000) {
>  			update_hw = 1;
>  			palette[0] = 0x4000;
> 

Thanks.

I wonder why the pseudo_palette in fb.h is 'void *' in the first place.
It seems to be cast to 'u32 *' everywhere...

 Tomi



Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ