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
9f9d8dc6
Commit
9f9d8dc6
authored
Jul 30, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Jul 30, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Handle strings with a length of 0xffff in SLTG_DoVars.
This means that the string is NULL so don't attempt to access the string data in this case.
parent
caf875f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
typelib.c
dlls/oleaut32/typelib.c
+9
-3
No files found.
dlls/oleaut32/typelib.c
View file @
9f9d8dc6
...
...
@@ -3161,9 +3161,15 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
case
VT_BSTR
:
{
WORD
len
=
*
(
WORD
*
)(
pBlk
+
pItem
->
byte_offs
);
INT
alloc_len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pBlk
+
pItem
->
byte_offs
+
2
,
len
,
NULL
,
0
);
BSTR
str
=
SysAllocStringLen
(
NULL
,
alloc_len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pBlk
+
pItem
->
byte_offs
+
2
,
len
,
str
,
alloc_len
);
BSTR
str
;
TRACE_
(
typelib
)(
"len = %u
\n
"
,
len
);
if
(
len
==
0xffff
)
{
str
=
NULL
;
}
else
{
INT
alloc_len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pBlk
+
pItem
->
byte_offs
+
2
,
len
,
NULL
,
0
);
str
=
SysAllocStringLen
(
NULL
,
alloc_len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pBlk
+
pItem
->
byte_offs
+
2
,
len
,
str
,
alloc_len
);
}
V_VT
((
*
ppVarDesc
)
->
vardesc
.
u
.
lpvarValue
)
=
VT_BSTR
;
V_BSTR
((
*
ppVarDesc
)
->
vardesc
.
u
.
lpvarValue
)
=
str
;
break
;
...
...
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