strcpy(dst, NULL) crash in MFS - file listing?
Brought to you by:
bartoldeman
Dosemu starts ok, I can start the DOS program "Ykkönen" fine, but when I do a certain action, dosemu crashes. The crash is in dos_fs_redirect(), case FIND_NEXT. The source argument for strcpy() seems to be NULL.
Here is a bit from the boot.log:
#5 <signal handler called>
#6 __strcpy_ssse3 () at ../sysdeps/x86_64/multiarch/strcpy-ssse3.S:43
#7 0x000055c2782505ec in dos_fs_redirect (state=0x55c27856eea0 <vm86u>)
at mfs.c:3961
#8 0x000055c2782518ac in mfs_redirector () at mfs.c:884
Ironically, the Debian built binary provided the crucial detail that my from-git hand-built with-debug binary doesn't:
#4 <signal handler called>
No locals.
#5 strlen () at ../sysdeps/x86_64/strlen.S:106
No locals.
#6 0x00007fa40c7106a5 in __strcpy_chk (
dest=0x7ffe26121750 "/home/tuija/.dosemu/drives/c/1for_you/1menus/",
src=0x0, destlen=4096) at strcpy_chk.c:28
len = <optimized out>
#7 0x0000556864d546c0 in ?? ()
No symbol table info available.
#8 0x0000556864d5601c in mfs_redirector ()
No symbol table info available.
I am attaching a patch that works around the crash and the program seemingly works fine, but I have no idea what I am doing here.
Here is the exhaustive boot.log in case it's of any use.