Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b3379223
Commit
b3379223
authored
Jan 19, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Avoid illegal filenames in CreateUrlCacheEntryW.
parent
2c9a41a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
urlcache.c
dlls/wininet/urlcache.c
+18
-1
No files found.
dlls/wininet/urlcache.c
View file @
b3379223
...
...
@@ -2313,9 +2313,26 @@ BOOL WINAPI CreateUrlCacheEntryW(
for
(
i
=
0
;
i
<
255
;
i
++
)
{
static
const
WCHAR
szFormat
[]
=
{
'['
,
'%'
,
'u'
,
']'
,
'%'
,
's'
,
0
};
static
const
WCHAR
szFormat
[]
=
{
'['
,
'%'
,
'u'
,
']'
,
'%'
,
's'
,
0
};
HANDLE
hFile
;
WCHAR
*
p
;
wsprintfW
(
lpszFileNameNoPath
+
countnoextension
,
szFormat
,
i
,
szExtension
);
for
(
p
=
lpszFileNameNoPath
+
1
;
*
p
;
p
++
)
{
switch
(
*
p
)
{
case
'<'
:
case
'>'
:
case
':'
:
case
'"'
:
case
'/'
:
case
'\\'
:
case
'|'
:
case
'?'
:
case
'*'
:
*
p
=
'_'
;
break
;
default:
break
;
}
}
if
(
p
[
-
1
]
==
' '
||
p
[
-
1
]
==
'.'
)
p
[
-
1
]
=
'_'
;
TRACE
(
"Trying: %s
\n
"
,
debugstr_w
(
lpszFileName
));
hFile
=
CreateFileW
(
lpszFileName
,
GENERIC_READ
,
0
,
NULL
,
CREATE_NEW
,
0
,
NULL
);
if
(
hFile
!=
INVALID_HANDLE_VALUE
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment