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
4bfc49a7
Commit
4bfc49a7
authored
Dec 25, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Dec 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Pass size without terminating null to get_cache_entry.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
08706ef3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
oleaut.c
dlls/oleaut32/oleaut.c
+4
-4
No files found.
dlls/oleaut32/oleaut.c
View file @
4bfc49a7
...
...
@@ -119,7 +119,7 @@ static inline bstr_t *bstr_from_str(BSTR str)
static
inline
bstr_cache_entry_t
*
get_cache_entry
(
size_t
size
)
{
unsigned
cache_idx
=
FIELD_OFFSET
(
bstr_t
,
u
.
ptr
[
size
-
1
])
/
BUCKET_SIZE
;
unsigned
cache_idx
=
FIELD_OFFSET
(
bstr_t
,
u
.
ptr
[
size
+
sizeof
(
WCHAR
)
-
1
])
/
BUCKET_SIZE
;
return
bstr_cache_enabled
&&
cache_idx
<
sizeof
(
bstr_cache
)
/
sizeof
(
*
bstr_cache
)
?
bstr_cache
+
cache_idx
:
NULL
;
...
...
@@ -127,14 +127,14 @@ static inline bstr_cache_entry_t *get_cache_entry(size_t size)
static
bstr_t
*
alloc_bstr
(
size_t
size
)
{
bstr_cache_entry_t
*
cache_entry
=
get_cache_entry
(
size
+
sizeof
(
WCHAR
)
);
bstr_cache_entry_t
*
cache_entry
=
get_cache_entry
(
size
);
bstr_t
*
ret
;
if
(
cache_entry
)
{
EnterCriticalSection
(
&
cs_bstr_cache
);
if
(
!
cache_entry
->
cnt
)
{
cache_entry
=
get_cache_entry
(
size
+
sizeof
(
WCHAR
)
+
BUCKET_SIZE
);
cache_entry
=
get_cache_entry
(
size
+
BUCKET_SIZE
);
if
(
cache_entry
&&
!
cache_entry
->
cnt
)
cache_entry
=
NULL
;
}
...
...
@@ -258,7 +258,7 @@ void WINAPI SysFreeString(BSTR str)
return
;
bstr
=
bstr_from_str
(
str
);
cache_entry
=
get_cache_entry
(
bstr
->
size
+
sizeof
(
WCHAR
)
);
cache_entry
=
get_cache_entry
(
bstr
->
size
);
if
(
cache_entry
)
{
unsigned
i
;
...
...
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