Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c564ee82
Commit
c564ee82
authored
Mar 30, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Mar 30, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Fix some string length calculations.
Fix some string length calculations that didn't account for the different sized characters with Unicode.
parent
4f40f172
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
urlcache.c
dlls/wininet/urlcache.c
+3
-3
No files found.
dlls/wininet/urlcache.c
View file @
c564ee82
...
...
@@ -943,8 +943,8 @@ static BOOL URLCache_CopyEntry(
lenUrl
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
,
-
1
,
NULL
,
0
);
else
lenUrl
=
strlen
((
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
);
dwRequiredSize
+=
lenUrl
+
1
;
dwRequiredSize
+=
(
lenUrl
+
1
)
*
(
bUnicode
?
sizeof
(
WCHAR
)
:
sizeof
(
CHAR
))
;
/* FIXME: is source url optional? */
if
(
*
lpdwBufferSize
>=
dwRequiredSize
)
{
...
...
@@ -970,7 +970,7 @@ static BOOL URLCache_CopyEntry(
{
lpCacheEntryInfo
->
lpszLocalFileName
=
lpszLocalFileName
;
}
dwRequiredSize
+=
nLocalFilePathSize
;
dwRequiredSize
+=
nLocalFilePathSize
*
(
bUnicode
?
sizeof
(
WCHAR
)
:
sizeof
(
CHAR
))
;
if
((
dwRequiredSize
%
4
)
&&
(
dwRequiredSize
<
*
lpdwBufferSize
))
ZeroMemory
((
LPBYTE
)
lpCacheEntryInfo
+
dwRequiredSize
,
4
-
(
dwRequiredSize
%
4
));
...
...
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