Starting from NT (not sure about '95), Windows is capable to handle
CDM_GETSPEC with NULL as lParam. It is handy for calculating
file name length if actual content does not matter while
it is undocumented behavior.
I suggest memcpy file name in FILEDLG95_Handle_GetFileSpec
if pointer is not zero only.
Besides this, MSDN clearly says passed buffer could be not large enough
for full file name. As far as I can see, WINE is fine for non-unicoded
flavour here and I suggest fixing for unicoded as well.