www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000151

When Created: 05/14/1997 13:28:01
Against DJGPP version: 2.01
By whom: A.Borrmann@tu-bs.de
Abstract: buggy stub symlink
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 firs
t...

Bye,
Andree

Solution added: 04/12/1999 11:00:22
By whom: eliz@is.elta.co.il
This was solved in v2.02.

Fixed in version on 04/12/1999 11:00:52
By whom: eliz@is.elta.co.il



  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010