[syslinux:master] core: When checking for DS:SI validity, we're using paragraph units
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Sun Feb 20 16:32:45 PST 2011
Commit-ID: 102b58a9960667208a2f37ca6058b9badad67111
Gitweb: http://syslinux.zytor.com/commit/102b58a9960667208a2f37ca6058b9badad67111
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sun, 20 Feb 2011 16:27:18 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Sun, 20 Feb 2011 16:27:18 -0800
core: When checking for DS:SI validity, we're using paragraph units
We are comparing DS:SI for a sane range, but we're operating in
paragraph units, so the comparison needs to be done that way, too.
Reported-by: Keshav P.R. <skodabenz at gmail.com>
Debugged-by: Michal Soltys <soltys at ziu.info>
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
core/diskboot.inc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/diskboot.inc b/core/diskboot.inc
index 7c02066..1be6ade 100644
--- a/core/diskboot.inc
+++ b/core/diskboot.inc
@@ -1,7 +1,7 @@
; -----------------------------------------------------------------------
;
; Copyright 1994-2009 H. Peter Anvin - All Rights Reserved
-; Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin
+; Copyright 2009-2011 Intel Corporation; author: H. Peter Anvin
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
@@ -185,7 +185,7 @@ harddisk:
shr si,4
jz .no_partition ; SI == 0 -> assume no partition
add dx,si
- cmp dx,1024 ; DS:SI < 1K (inside the IVT)?
+ cmp dx,1024 >> 4 ; DS:SI < 1K (inside the IVT)?
jb .no_partition
cmp dx,PartInfo >> 4 ; DS:SI in overwritten memory?
jae .no_partition
More information about the Syslinux-commits
mailing list