[PATCH fbdev] Fix shadow fb allocation size
Adam Jackson
ajax at redhat.com
Tue Jan 3 21:25:19 UTC 2017
->bitsPerPixel is rather obviously eight times too large.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
src/fbdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fbdev.c b/src/fbdev.c
index 2c658fe..dbc09bf 100644
--- a/src/fbdev.c
+++ b/src/fbdev.c
@@ -828,7 +828,7 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
if (fPtr->shadowFB) {
fPtr->shadow = calloc(1, pScrn->virtualX * pScrn->virtualY *
- pScrn->bitsPerPixel);
+ ((pScrn->bitsPerPixel + 7) / 8));
if (!fPtr->shadow) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
--
2.9.3
More information about the xorg-devel
mailing list