mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
touchscreen: fix a crash with segfaults on x64 machines
This commit is contained in:
parent
60e06a17a3
commit
6f8b63acfe
@ -0,0 +1,24 @@
|
||||
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;
|
@ -1,2 +1,6 @@
|
||||
+100
|
||||
102
|
||||
- Fix a crash with segfaults on x64 machines
|
||||
101
|
||||
- Update
|
||||
100
|
||||
- Initial release
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
PKG_NAME="touchscreen"
|
||||
PKG_VERSION="1.0"
|
||||
PKG_REV="101"
|
||||
PKG_REV="102"
|
||||
PKG_ARCH="any"
|
||||
PKG_ADDON_PROJECTS="Generic RPi"
|
||||
PKG_LICENSE="GPL"
|
||||
|
Loading…
x
Reference in New Issue
Block a user