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: 15 May 1997 16:26:02 GMT Organization: IBR, TU Braunschweig, Germany Lines: 43 Distribution: world Message-ID: <5lfdeq$4g9$1@ra.ibr.cs.tu-bs.de> NNTP-Posting-Host: rzab4.rz.tu-bs.de To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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