* Fix menuconfig.init memory corruption; strstr does not work on file

contents unless they are guaranteed to be zero-terminated by some
  out-of-band means (such as help texts).
master
Colin Watson 16 years ago
parent 183d8899d1
commit 267d54bd4b

3
debian/changelog vendored

@ -1,6 +1,9 @@
gfxboot-theme-ubuntu (0.5.11) UNRELEASED; urgency=low
* Backport 'split' memory corruption fix from SuSE.
* Fix menuconfig.init memory corruption; strstr does not work on file
contents unless they are guaranteed to be zero-terminated by some
out-of-band means (such as help texts).
-- Colin Watson <cjwatson@ubuntu.com> Thu, 20 Mar 2008 22:12:01 +0000

@ -126,8 +126,10 @@
dup cvp length 0 eq { exit } if
% break lines at \r or \n
dup "\x0d" strstr dup 0 ne { 1 sub over exch 0 put } { pop } ifelse
dup "\n" strstr dup 0 ne { 1 sub over exch 0 put } { pop } ifelse
0 1 2 index length 1 sub {
over over get
dup '\x0d' eq exch '\n' eq or { over exch 0 put exit } { pop } ifelse
} for
skipspace getword tolower
% keep in sync with common.inc:MenuInit

Loading…
Cancel
Save