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
d82c456e
Commit
d82c456e
authored
May 23, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
May 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: The persisted version of URL monikers should be size of URL
including nul-terminating character (4-bytes), followed by the URL string including nul-terminating character.
parent
d76a15a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
umon.c
dlls/urlmon/umon.c
+10
-11
No files found.
dlls/urlmon/umon.c
View file @
d82c456e
...
...
@@ -410,23 +410,23 @@ static HRESULT WINAPI URLMonikerImpl_Load(IMoniker* iface,IStream* pStm)
URLMonikerImpl
*
This
=
(
URLMonikerImpl
*
)
iface
;
HRESULT
res
;
ULONG
len
;
ULONG
size
;
ULONG
got
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
pStm
);
if
(
!
pStm
)
return
E_INVALIDARG
;
res
=
IStream_Read
(
pStm
,
&
len
,
sizeof
(
ULONG
),
&
got
);
res
=
IStream_Read
(
pStm
,
&
size
,
sizeof
(
ULONG
),
&
got
);
if
(
SUCCEEDED
(
res
))
{
if
(
got
==
sizeof
(
ULONG
))
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
URLName
);
This
->
URLName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
of
(
WCHAR
)
*
(
len
+
1
)
);
This
->
URLName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
This
->
URLName
)
res
=
E_OUTOFMEMORY
;
else
{
res
=
IStream_Read
(
pStm
,
This
->
URLName
,
len
,
NULL
);
This
->
URLName
[
len
]
=
0
;
res
=
IStream_Read
(
pStm
,
This
->
URLName
,
size
,
NULL
);
This
->
URLName
[
size
/
sizeof
(
WCHAR
)
-
1
]
=
0
;
}
}
else
...
...
@@ -445,16 +445,16 @@ static HRESULT WINAPI URLMonikerImpl_Save(IMoniker* iface,
URLMonikerImpl
*
This
=
(
URLMonikerImpl
*
)
iface
;
HRESULT
res
;
ULONG
len
;
ULONG
size
;
TRACE
(
"(%p,%p,%d)
\n
"
,
This
,
pStm
,
fClearDirty
);
if
(
!
pStm
)
return
E_INVALIDARG
;
len
=
strlenW
(
This
->
URLName
);
res
=
IStream_Write
(
pStm
,
&
len
,
sizeof
(
ULONG
),
NULL
);
size
=
(
strlenW
(
This
->
URLName
)
+
1
)
*
sizeof
(
WCHAR
);
res
=
IStream_Write
(
pStm
,
&
size
,
sizeof
(
ULONG
),
NULL
);
if
(
SUCCEEDED
(
res
))
res
=
IStream_Write
(
pStm
,
This
->
URLName
,
len
*
sizeof
(
WCHAR
)
,
NULL
);
res
=
IStream_Write
(
pStm
,
This
->
URLName
,
size
,
NULL
);
return
res
;
}
...
...
@@ -472,8 +472,7 @@ static HRESULT WINAPI URLMonikerImpl_GetSizeMax(IMoniker* iface,
if
(
!
pcbSize
)
return
E_INVALIDARG
;
pcbSize
->
u
.
LowPart
=
sizeof
(
ULONG
)
+
(
strlenW
(
This
->
URLName
)
*
sizeof
(
WCHAR
));
pcbSize
->
u
.
HighPart
=
0
;
pcbSize
->
QuadPart
=
sizeof
(
ULONG
)
+
((
strlenW
(
This
->
URLName
)
+
1
)
*
sizeof
(
WCHAR
));
return
S_OK
;
}
...
...
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