aboutsummaryrefslogtreecommitdiffstats
path: root/bcopy32.inc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-01-03 20:32:11 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-01-03 20:32:11 -0800
commit6e799707077193baa008edcb040aadcd913bac90 (patch)
treedfe4a293a19a7634b80bc5ad6c4f34a2d69fdc83 /bcopy32.inc
parentcaa70e42a5e2a6f74a1624900d84c33a3d71a91e (diff)
downloadsyslinux.git-6e799707077193baa008edcb040aadcd913bac90.tar.gz
syslinux.git-6e799707077193baa008edcb040aadcd913bac90.tar.xz
syslinux.git-6e799707077193baa008edcb040aadcd913bac90.zip
Fix incorrect handling of overlapping memory areas in bcopy32syslinux-3.55-pre3
bcopy32 had the test for forwards vs. backwards copy backwards, which of course resulted in disaster when memory areas actually overlapped themselves.
Diffstat (limited to 'bcopy32.inc')
-rw-r--r--bcopy32.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/bcopy32.inc b/bcopy32.inc
index 28b70fad..0f01284a 100644
--- a/bcopy32.inc
+++ b/bcopy32.inc
@@ -135,8 +135,8 @@ bcopy: push eax
cmp esi,-1
je .bzero
- cmp esi,edi ; If source > destination, we might
- ja .reverse ; have to copy backwards
+ cmp esi,edi ; If source < destination, we might
+ jb .reverse ; have to copy backwards
.forward:
mov al,cl ; Save low bits