EXTLINUX: correct bug when accessing an empty file; update NEWS.
authorH. Peter Anvin <hpa@zytor.com>
Wed, 16 Jan 2008 18:00:32 +0000 (13:00 -0500)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 16 Jan 2008 18:00:32 +0000 (13:00 -0500)
Correct a bug that caused EXTLINUX to crash when accessing an empty
file.

NEWS
extlinux.asm

diff --git a/NEWS b/NEWS
index e3c2027..220fc0f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ Starting with 1.47, changes marked with SYSLINUX/PXELINUX/ISOLINUX
 apply to that specific program only; other changes apply to all of
 them.
 
+Changes in 3.61:
+       * EXTLINUX: fix crash when accessing an empty file.
+       * elf.c32: If a PHDR segment is present, load it.
+       * Fix SHA-1 passwords.
+
 Changes in 3.60:
        * Support for "auxilliary data vector", a small amount of
          writable storage.  Currently only supported for EXTLINUX,
index a559308..9459f56 100644 (file)
@@ -1072,7 +1072,7 @@ searchdir:
                push eax                ; Save directory inode
 
                call open_inode
-               jz .done                ; If error, done
+               jz .missing             ; If error, done
 
                mov cx,[si+file_mode]
                shr cx,S_IFSHIFT        ; Get file type
@@ -1102,6 +1102,10 @@ searchdir:
                pop bx
                ret
 
+.missing:
+               add sp,4                ; Drop directory inode
+               jmp .done
+
                ;
                ; It's a file.
                ;