aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-11-22 08:59:20 +0000
committerTimo Teräs <timo.teras@iki.fi>2014-11-22 08:59:46 +0000
commit9cfd4b125daacff3e09c527e020432e3660ce1f8 (patch)
tree4f3fc6f702606c7fa2e35add924dc64db16611ba /main/busybox/1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch
parentc3752969e308ec6d7f9eab043d79cb6d31dcfc62 (diff)
downloadaports-9cfd4b125daacff3e09c527e020432e3660ce1f8.tar.bz2
aports-9cfd4b125daacff3e09c527e020432e3660ce1f8.tar.xz
main/busybox: fixes and minor new features to fbsplash
Diffstat (limited to 'main/busybox/1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch')
-rw-r--r--main/busybox/1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/main/busybox/1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch b/main/busybox/1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch
new file mode 100644
index 0000000000..ddfeb7f967
--- /dev/null
+++ b/main/busybox/1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch
@@ -0,0 +1,32 @@
+From 7f70f194ae135bd1e856c2dc811b8fa4a56296ea Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Thu, 20 Sep 2012 09:41:56 +0300
+Subject: [PATCH] fbsplash: use virtual y size in mmap size calculations
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The virtual y can be larger - and we can be even writing there since
+we are taking into account the y offset. Avoids possible crash.
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+---
+ miscutils/fbsplash.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
+index 7b695b2..58e491d 100644
+--- a/miscutils/fbsplash.c
++++ b/miscutils/fbsplash.c
+@@ -150,7 +150,7 @@ static void fb_open(const char *strfb_device)
+
+ // map the device in memory
+ G.addr = mmap(NULL,
+- G.scr_var.yres * G.scr_fix.line_length,
++ G.scr_var.yres_virtual * G.scr_fix.line_length,
+ PROT_WRITE, MAP_SHARED, fbfd, 0);
+ if (G.addr == MAP_FAILED)
+ bb_perror_msg_and_die("mmap");
+--
+2.1.3
+