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
808c47ce
Commit
808c47ce
authored
Sep 09, 2013
by
Andrew Eikum
Committed by
Alexandre Julliard
Sep 09, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Typelib strings of size -1 are NULL.
parent
6cb21569
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
typelib.c
dlls/oleaut32/typelib.c
+6
-13
No files found.
dlls/oleaut32/typelib.c
View file @
808c47ce
...
...
@@ -2258,25 +2258,18 @@ static void MSFT_ReadValue( VARIANT * pVar, int offset, TLBContext *pcx )
case
VT_BSTR
:{
char
*
ptr
;
MSFT_ReadLEDWords
(
&
size
,
sizeof
(
INT
),
pcx
,
DO_NOT_SEEK
);
if
(
size
<
0
)
{
char
next
;
DWORD
origPos
=
MSFT_Tell
(
pcx
),
nullPos
;
do
{
MSFT_Read
(
&
next
,
1
,
pcx
,
DO_NOT_SEEK
);
}
while
(
next
);
nullPos
=
MSFT_Tell
(
pcx
);
size
=
nullPos
-
origPos
;
MSFT_Seek
(
pcx
,
origPos
);
}
ptr
=
heap_alloc_zero
(
size
);
/* allocate temp buffer */
MSFT_Read
(
ptr
,
size
,
pcx
,
DO_NOT_SEEK
);
/* read string (ANSI) */
if
(
size
==
-
1
){
V_BSTR
(
pVar
)
=
NULL
;
}
else
{
ptr
=
heap_alloc_zero
(
size
);
MSFT_Read
(
ptr
,
size
,
pcx
,
DO_NOT_SEEK
);
V_BSTR
(
pVar
)
=
SysAllocStringLen
(
NULL
,
size
);
/* FIXME: do we need a AtoW conversion here? */
V_UNION
(
pVar
,
bstrVal
[
size
])
=
'\0'
;
while
(
size
--
)
V_UNION
(
pVar
,
bstrVal
[
size
])
=
ptr
[
size
];
heap_free
(
ptr
);
}
}
size
=-
4
;
break
;
/* FIXME: this will not work AT ALL when the variant contains a pointer */
case
VT_DISPATCH
:
...
...
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