Mail Archives: djgpp/1997/05/20/14:50:50
From: | y0000980 AT ws DOT rz DOT tu-bs DOT de (Andree Borrmann)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Buggy Symlinks (Bug in Stub.asm)
|
Date: | 20 May 1997 10:35:04 GMT
|
Organization: | Technische Universitaet Braunschweig, Germany
|
Lines: | 44
|
Distribution: | world
|
Message-ID: | <5lruoo$fs$1@ra.ibr.cs.tu-bs.de>
|
NNTP-Posting-Host: | rzab5.rz.tu-bs.de
|
Keywords: | symlink DJGPP stub bug
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi!
I wonder if I am the first one who found this serious bug inside the stub:
Symlinks which filename without extension is 8 chars long fail (most times),
here is why:
; (stub.asm)
;-----------------------------------------------------------------------------
; Replace the stub's file name with the link's name after the directory
mov cx, 8 ; max length of basename
mov di, stubinfo_basename ; pointer to new basename
@b1:
mov al, [di] ; get next character
inc di
or al, al ; end of basename?
je @f1
mov [bx], al ; store character
inc bx
loop @b1 ; eight characters?
@f1:
movd [bx+0], 0x4558452e ; append ".EXE"
add bx, 4
mov [bx], al ; al = 0
!!! al is NOT 0 if basename was 8 chars... !!!
movb [bx], 0 ; this is better !!!
IMHO their are too many assumptions like this one in "stub.asm"...
may be a bit to much "size-optimization"...
(BTW: in PMSTUB.ASM from pmodedj it's:
mov [byte ptr bx], 0
interesting, he?)
Another question for me is why it sometimes work, eg. if I've started iview first...
Bye,
Andree
- Raw text -