Issue 49889 - sys file picker (win) crashes with file names containing ASCII characters 1..31
Summary: sys file picker (win) crashes with file names containing ASCII characters 1..31
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All Windows, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2005-05-26 08:46 UTC by andreas.schluens
Modified: 2013-08-07 15:31 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description andreas.schluens 2005-05-26 08:46:35 UTC
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.

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
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
Comment 7 kai.sommerfeld 2009-07-13 12:40:13 UTC
cd: Please take over.