Apache OpenOffice (AOO) Bugzilla – Issue 49889
sys file picker (win) crashes with file names containing ASCII characters 1..31
Last modified: 2013-08-07 15:31:14 UTC
a) Create a file which uses ASCI characters 1..31 (0x00..0x1F) e.g. on an unix machine. How? Type into a system shell "test\1\5_.odt" and you get a file with 0x01 and 0x05 characters. b) Try to open this file on windows (using samba or nfs) using the system file picker of the office. First time nothing will happen ... but if you try to load the file a second time ... it crashes. => The reason: Your struct LPOPENFILENAME contains the values "lpstrFile" and "nFileOffset". And you will get a value 65531 as "nFileOffset" .-) So you call later "m_displayDirectory = rtl::OUString(m_ofn.lpstrFile,m_ofn. nFileOffset);" in file "fpicker\source\win32\filepicker\FileOpenDlg.cxx". And the construction of the OUString will fail. May be there is a chance to detect such "not relay true" length informations and reject or ignore it.
Reassigned for change of responsibilities sake.
SBA: See also issue 64764 ("Can't open files with Unicode filename or path from Explorer").
@SBA: Issue 64764 has a different reason.
.
as: sorry, no time left to fix this for 2.4.
Retargeted.
cd: Please take over.