[syslinux] [PATCH 1/1] CORE/writedec: Fix overflow and redeclaration
Gene Cumm
gene.cumm at gmail.com
Tue Mar 17 09:12:22 PDT 2009
From: Gene Cumm <gene.cumm at gmail.com>
CORE/writedec: Fix overflow and redeclaration; If EDX is greater than
or equal to 10, div can cause an overflow. Comment out declaration of
writechr.
Signed-off-by: Gene Cumm <gene.cumm at gmail.com>
---
Against current head.
hpa: If there's a preferred way to do what this function provides, let
me know. Was the writechr in there on purpose to prevent the use of
this function?
diff --git a/core/writedec.inc b/core/writedec.inc
index 10bf7ba..6101aeb 100644
--- a/core/writedec.inc
+++ b/core/writedec.inc
@@ -37,7 +37,8 @@ writedec_common:
xor cx,cx ; Number of digits
.cloop:
- div ebx
+ mov edx,0 ; Zero out high part
+ div ebx ; unsigned divide edx:eax/ebx
inc cx
push dx
and eax,eax
@@ -53,5 +54,5 @@ writedec_common:
popad
ret
-writechr:
- ret
+; writechr:
+; ret
More information about the Syslinux
mailing list