aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-03 15:23:01 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-03 15:23:01 -0700
commit71e120ecacc2e124ccda5ba5ada48ad860e10dd5 (patch)
treeddb986b7b9166c0a0d5f487b01233844f989d336
parent6a65f76af9673bfb8c9e833fd199f9ec367e472f (diff)
downloadsyslinux.git-syslinux-3.80-pre8.tar.gz
syslinux.git-syslinux-3.80-pre8.tar.xz
syslinux.git-syslinux-3.80-pre8.zip
shuffler: when looking for temporary memory, it has to be *free!*syslinux-3.80-pre8
free_area() ended up looking for any area of memory, not necessarily a *free* area of memory. This had predictably disastrous consequences. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/lib/syslinux/movebits.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/com32/lib/syslinux/movebits.c b/com32/lib/syslinux/movebits.c
index fbf0a345..0da3146b 100644
--- a/com32/lib/syslinux/movebits.c
+++ b/com32/lib/syslinux/movebits.c
@@ -203,6 +203,8 @@ static addr_t free_area(const struct syslinux_memmap *mmap,
addr_t slen, best_len = -1;
for (s = mmap; s->type != SMT_END; s = s->next) {
+ if (s->type != SMT_FREE)
+ continue;
slen = s->next->start - s->start;
if (slen >= len) {
if (!best || best_len > slen) {