diff options
author | hpa <hpa> | 2001-12-11 09:27:42 +0000 |
---|---|---|
committer | hpa <hpa> | 2001-12-11 09:27:42 +0000 |
commit | e95b77ec2c49dfbdef8a05a58b6034a09a41b1e1 (patch) | |
tree | d3cd72b764ce3ad9230a8a319acf780971304ef6 | |
parent | 24612a86668be7a66deabe2644804c5a6e3370ad (diff) | |
download | syslinux-e95b77ec2c49dfbdef8a05a58b6034a09a41b1e1.tar.gz |
Fix a couple of stack mishandling bugs...
-rw-r--r-- | memdisk/memdisk.asm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/memdisk/memdisk.asm b/memdisk/memdisk.asm index 6688f0ec..af5a2a34 100644 --- a/memdisk/memdisk.asm +++ b/memdisk/memdisk.asm @@ -62,7 +62,7 @@ Int13Start: push dx xor dl,[cs:DriveNo] pop dx - js .nomatch ; If SF=0, we have a match here + js .nomatch ; If SF=0, we have a class match here jz .our_drive ; If ZF=1, we have an exact match cmp dl,[cs:DriveNo] jb .nomatch ; Drive < Our drive @@ -111,12 +111,12 @@ DoneWeird: Reset: ; Reset affects multiple drives, so we need to pass it on + mov [LastStatus],al ; Clear the status (AL = 0) pop ax ; Drop return address - mov [LastStatus], byte 0 - popad + popad ; Restore all registers pop es pop ds - lss esp,[cs:Stack] + lss esp,[cs:Stack] ; Restore the stack and dl,80h ; Clear all but the type bit jmp far [cs:OldInt13] @@ -128,7 +128,7 @@ GetDriveType: mov ah,[DriveNo] shr ah,7 pushf - or ah,02h ; CF = 0 + or ah,02h mov P_AH,ah popf jz .floppy @@ -332,9 +332,9 @@ bcopy: push ebx push edx push ebp +.copy_loop: push esi push edi -.copy_loop: push ecx cmp ecx,8000h jna .safe_size |