From c4c59790f3191c1a233fc1a61f8fedad85de1aeb Mon Sep 17 00:00:00 2001
From: Peter Fink <pfink@christ-es.de>
Date: Wed, 8 Feb 2017 14:04:45 +0100
Subject: [PATCH] fbutils: Fix x64 execution. Call malloc not with a hardcoded
 sizeof(__u32). This caused the application to crash with segfaults on x64
 machines.

---
 tests/fbutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/fbutils.c b/tests/fbutils.c
index 8ee494bc..fd7fbfe9 100644
--- a/tests/fbutils.c
+++ b/tests/fbutils.c
@@ -138,7 +138,7 @@ int open_framebuffer(void)
 	memset(fbuffer,0,fix.smem_len);
 
 	bytes_per_pixel = (var.bits_per_pixel + 7) / 8;
-	line_addr = malloc (sizeof (__u32) * var.yres_virtual);
+	line_addr = malloc (sizeof (line_addr) * var.yres_virtual);
 	addr = 0;
 	for (y = 0; y < var.yres_virtual; y++, addr += fix.line_length)
 		line_addr [y] = fbuffer + addr;
