Skip to content

Commit

Permalink
fix, LFN search on redirected drive should not read plus size (ecm)
Browse files Browse the repository at this point in the history
  • Loading branch information
boeckmann committed Jul 3, 2024
1 parent 321c232 commit 4132acc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions drdos/header.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,10 @@ lfn_find_handle_heap_free:
lfnpathflag:
db 0

Public lfn_search_redir
lfn_search_redir:
db 0

PCMODE_CODE ends

PCM_CODEND segment public para 'CODE'
Expand Down
7 changes: 5 additions & 2 deletions drdos/lfn.asm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ PCMODE_CODE segment public word 'DATA'
extrn lfn_find_handle_heap_end:word
extrn lfn_find_handle_heap_free:word
extrn lfnpathflag:byte
; extrn lfn_search_redir:byte
extrn lfn_search_redir:byte
PCMODE_CODE ends

BDOS_CODE segment public word 'CODE'
Expand Down Expand Up @@ -381,7 +381,7 @@ f714e_entry:
mov FD_FUNC,ax
; mov FD_LFNSEARCH,1 ; use FAT+/LFN extensions
mov fdos_pb+10,1 ; use FAT+/LFN extensions
mov lfnpathflag, 1
mov word ptr lfnpathflag, 1
push di ; handle
push ds
push ss:dma_segment ; save old DTA
Expand Down Expand Up @@ -434,7 +434,10 @@ f714f_10:
xor ax,ax ; zero high dword
stosw
stosw
rol ss:lfn_search_redir, 1
jc f714F_redir_no_plus_size
mov al,[si-7] ; extended file size
f714F_redir_no_plus_size:
stosw
xor ax,ax
stosw
Expand Down
7 changes: 6 additions & 1 deletion drdos/redir.asm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ title 'REDIR - DOS file system network redirector interace support'
; ENDLOG

PCMCODE GROUP BDOS_CODE
PCMDATA GROUP PCMODE_DATA
PCMDATA GROUP PCMODE_DATA,PCMODE_CODE

ASSUME DS:PCMDATA

Expand Down Expand Up @@ -102,6 +102,10 @@ PCMODE_DATA segment public word 'DATA'

PCMODE_DATA ends

PCMODE_CODE segment public word 'DATA'
extrn lfn_search_redir:byte
PCMODE_CODE ends

BDOS_CODE segment public byte 'CODE'

Public islocal
Expand Down Expand Up @@ -280,6 +284,7 @@ redir_accept:
;============
; We have decided to accept an FDOS function.
; Note by this time the functions have been validated as legal
mov lfn_search_redir, 0FFh
mov file_attrib,16h ; default search attribs to all
pop si ; discard the near return address
mov si,2[bp] ; SI -> parameter block
Expand Down

0 comments on commit 4132acc

Please sign in to comment.