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
3076f5e3
Commit
3076f5e3
authored
Oct 03, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Always create a copy of strings to insert in the dictionary.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0567952c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
channel.c
dlls/webservices/channel.c
+13
-2
No files found.
dlls/webservices/channel.c
View file @
3076f5e3
...
...
@@ -1208,14 +1208,24 @@ static HRESULT CALLBACK dict_cb( void *state, const WS_XML_STRING *str, BOOL *fo
{
struct
dictionary
*
dict
=
state
;
HRESULT
hr
=
S_OK
;
BYTE
*
bytes
;
int
index
;
if
((
index
=
find_string
(
dict
,
str
->
bytes
,
str
->
length
,
id
))
==
-
1
||
(
hr
=
insert_string
(
dict
,
str
->
bytes
,
str
->
length
,
index
,
id
))
==
S_OK
)
if
((
index
=
find_string
(
dict
,
str
->
bytes
,
str
->
length
,
id
))
==
-
1
)
{
*
found
=
TRUE
;
return
S_OK
;
}
if
(
!
(
bytes
=
heap_alloc
(
str
->
length
)))
return
E_OUTOFMEMORY
;
memcpy
(
bytes
,
str
->
bytes
,
str
->
length
);
if
((
hr
=
insert_string
(
dict
,
bytes
,
str
->
length
,
index
,
id
))
==
S_OK
)
{
*
found
=
TRUE
;
return
S_OK
;
}
heap_free
(
bytes
);
*
found
=
FALSE
;
return
hr
;
}
...
...
@@ -1672,6 +1682,7 @@ static HRESULT build_dict( const BYTE *buf, ULONG buflen, struct dictionary *dic
}
if
((
hr
=
insert_string
(
dict
,
bytes
,
size
,
index
,
NULL
))
!=
S_OK
)
{
heap_free
(
bytes
);
clear_dict
(
dict
);
return
hr
;
}
...
...
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