From 183d8899d107bd83a4e699a50599ec7e4de8313a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 20 Mar 2008 22:14:40 +0000 Subject: [PATCH] * Backport 'split' memory corruption fix from SuSE. --- debian/changelog | 6 ++++++ system.inc | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8982073..0567783 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +gfxboot-theme-ubuntu (0.5.11) UNRELEASED; urgency=low + + * Backport 'split' memory corruption fix from SuSE. + + -- Colin Watson Thu, 20 Mar 2008 22:12:01 +0000 + gfxboot-theme-ubuntu (0.5.10) hardy; urgency=low * Fix a stack leak in menuitemmap. diff --git a/system.inc b/system.inc index 810ab43..216eb35 100644 --- a/system.inc +++ b/system.inc @@ -563,15 +563,18 @@ def % /split { + % split does not work if str1 is in a special memory region (where + % 'cvp length' does not work). So we dup it first. + + exch strdup dup rot + currenteotchar exch seteotchar exch [ exch { - dup length 0 gt { - dup strdup exch - dup length add - } if + dup strdup exch + dup length add dup cvp length 1 le { pop exit } if @@ -583,6 +586,8 @@ def exch seteotchar + exch free + } def