mirror of
https://github.com/openbsd/xenocara.git
synced 2025-12-13 20:59:03 +00:00
The color map support in wsfb(4) only supports up to 256 palette entries.
However for 30-bit color depth modes, Xorg assumes 1024 palette entries are supported. Since we don't actually support hardware with both 30-bit color depth and hardware palette support, skip the color map handling in that case. This is what the xf86-video-ati driver does as well. This prevents us from smashing the stack. ok matthieu@
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: wsfb_driver.c,v 1.39 2021/03/13 14:00:04 kettenis Exp $ */
|
/* $OpenBSD: wsfb_driver.c,v 1.40 2022/02/07 18:38:44 kettenis Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright © 2001-2012 Matthieu Herrb
|
* Copyright © 2001-2012 Matthieu Herrb
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@@ -1034,7 +1034,8 @@ WsfbScreenInit(SCREEN_INIT_ARGS_DECL)
|
|||||||
/* On StaticGray visuals, fake a 256 entries colormap. */
|
/* On StaticGray visuals, fake a 256 entries colormap. */
|
||||||
if (ncolors == 0)
|
if (ncolors == 0)
|
||||||
ncolors = 256;
|
ncolors = 256;
|
||||||
if(!xf86HandleColormaps(pScreen, ncolors, 8, WsfbLoadPalette,
|
if (pScrn->depth != 30 &&
|
||||||
|
!xf86HandleColormaps(pScreen, ncolors, 8, WsfbLoadPalette,
|
||||||
NULL, flags))
|
NULL, flags))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user