Issue 49889

Summary: sys file picker (win) crashes with file names containing ASCII characters 1..31
Product: General Reporter: andreas.schluens
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, kpalagin
Version: current   
Target Milestone: ---   
Hardware: All   
OS: Windows, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description andreas.schluens 2005-05-26 08:46:35 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.
Comment 1 tino.rachui 2005-06-13 12:29:22 UTC
Reassigned for change of responsibilities sake.
Comment 2 stefan.baltzer 2006-11-29 16:27:21 UTC
SBA: See also issue 64764 ("Can't open files with Unicode filename or path from
Explorer").
Comment 3 hennes.rohling 2007-05-22 09:53:45 UTC
@SBA: Issue 64764 has a different reason.
Comment 4 hennes.rohling 2007-08-01 10:10:44 UTC
.
Comment 5 kai.sommerfeld 2008-01-14 11:17:51 UTC
as: sorry, no time left to fix this for 2.4.
Comment 6 hennes.rohling 2008-05-30 10:53:38 UTC
Retargeted.
Comment 7 kai.sommerfeld 2009-07-13 12:40:13 UTC
cd: Please take over.