diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-09-02 16:14:28 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-02 16:14:28 -0700 |
commit | e61036415599f77a4bf133e0e9805f834c3adaa7 (patch) | |
tree | a82be1a18404e9f31d0fca195cc2260162b18579 /core/isolinux.asm | |
parent | 8740d14732486996b15730e37c395ff2630606ef (diff) | |
download | syslinux-e61036415599f77a4bf133e0e9805f834c3adaa7.tar.gz |
isolinux: return failure when opening a zero-length file
In the Syslinux view of the world, a zero-length file doesn't exist
and therefore should return error on open. A lot of the code relies
on this, but ISOLINUX allowed a zero-length file to be opened, which
could cause all kinds of trouble.
It would be nicer to not have that restriction, but removing it will
probably not happen until the configuration code is rewritten in C.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/isolinux.asm')
-rw-r--r-- | core/isolinux.asm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/isolinux.asm b/core/isolinux.asm index f7c13669..f93b24e6 100644 --- a/core/isolinux.asm +++ b/core/isolinux.asm @@ -1232,7 +1232,8 @@ searchdir_iso: shr eax,SECTOR_SHIFT mov [bx+file_left],eax pop eax - and bx,bx ; ZF = 0 + jz .failure ; Empty file? + ; ZF = 0 mov si,bx pop es ret |