summaryrefslogtreecommitdiff
path: root/com32/lib/syslinux/shuffle.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib/syslinux/shuffle.c')
-rw-r--r--com32/lib/syslinux/shuffle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/com32/lib/syslinux/shuffle.c b/com32/lib/syslinux/shuffle.c
index 196fc64a..6c33d0a5 100644
--- a/com32/lib/syslinux/shuffle.c
+++ b/com32/lib/syslinux/shuffle.c
@@ -141,11 +141,12 @@ int syslinux_do_shuffle(struct syslinux_movelist *fraglist,
sizeof(struct shuffle_descriptor)*DESC_BLOCK_SIZE
+ sizeof(struct shuffle_descriptor) + shuffler_size;
- if (descfree < descmem)
+ descaddr = (desczone + descfree - descmem) & ~3;
+
+ if (descaddr < desczone)
goto bail; /* No memory block large enough */
/* Mark memory used by shuffle descriptors as reserved */
- descaddr = desczone + descfree - descmem;
if (syslinux_add_memmap(&rxmap, descaddr, descmem, SMT_RESERVED))
goto bail;