Commit Graph

5 Commits

Author SHA1 Message Date
C. Masloch
132a0a9f94 truename: fix array overrun (pick from fdpp)
Picked from the commit at fe1c4dc7fe

The referenced issue is at https://github.com/dosemu2/fdpp/issues/212

The patch was applied using unix2dos on the patch file
then `patch -p1 --binary` with the patch file as stdin.
The original used a new define for the maximum path length.
As there is no difference to our current SFTMAX define I
changed this hunk to retain the SFTMAX use.

This fixes a bug when eg function 3Dh receives a buffer
that starts with ".\" but the byte in memory before this
buffer happens to be also a dot. I ran into this problem
semi-randomly during building EDR-DOS with the most recent
WarpLink build. If WarpLink was placed somewhat low in the
Low Memory Area then one of its function 3Dh calls would
happen to have a dot before the pathname buffer. (I had to
load lCDebug using the last fit strategy then enter TSR mode,
to catch the bug without the presence of the debugger working
around the occurrence of the bug.)

Original commit Metadata:

From: Stas Sergeev <stsp@users.sourceforge.net>
Date: Wed, 1 Feb 2023 13:01:55 +0500
Subject: [PATCH] truename: fix array overrun [fixes #212]

src[-2] was peeking into a random memory location.
It seems entire truename() is written by some morons... :(
Its completely unreadable and full of bugs.
2023-08-26 21:32:19 -04:00
Kenneth J Davis
6ada304ec2 allow opening a character device prefixed with invalid drive letter (e.g. "@:NUL") but not with invalid path 2021-08-19 00:00:29 -04:00
Kenneth J Davis
77b36d2458 revert this change - does not seem correct testing with MSDOS 5 and 6
original commit notes 'Fix an error at opening a character device prefixed with invalid drive letter (e.g. "@:NUL") (some application use it for opening character device driver)', need to test case but breaks TRUENAME asis
2021-08-15 18:00:10 -04:00
lpproj
bc4615093a Fix an error at opening a character device prefixed with invalid drive letter (e.g. "@:NUL")
(some application use it for opening character device driver)
2015-09-22 12:06:43 +09:00
KJD
c431157156 FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00