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
e222e88a
Commit
e222e88a
authored
Jun 20, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Avoid accessing the old user buffer in WsSetOutput/ToBuffer.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ab2f25d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
writer.c
dlls/webservices/writer.c
+5
-2
No files found.
dlls/webservices/writer.c
View file @
e222e88a
...
...
@@ -39,7 +39,7 @@ static const struct prop_desc writer_props[] =
{
{
sizeof
(
ULONG
),
FALSE
},
/* WS_XML_WRITER_PROPERTY_MAX_DEPTH */
{
sizeof
(
BOOL
),
FALSE
},
/* WS_XML_WRITER_PROPERTY_ALLOW_FRAGMENT */
{
sizeof
(
ULONG
),
FALSE
},
/* WS_XML_
READ
ER_PROPERTY_MAX_ATTRIBUTES */
{
sizeof
(
ULONG
),
FALSE
},
/* WS_XML_
WRIT
ER_PROPERTY_MAX_ATTRIBUTES */
{
sizeof
(
BOOL
),
FALSE
},
/* WS_XML_WRITER_PROPERTY_WRITE_DECLARATION */
{
sizeof
(
ULONG
),
FALSE
},
/* WS_XML_WRITER_PROPERTY_INDENT */
{
sizeof
(
ULONG
),
FALSE
},
/* WS_XML_WRITER_PROPERTY_BUFFER_TRIM_SIZE */
...
...
@@ -85,6 +85,7 @@ struct writer
WS_CHARSET
output_charset
;
WS_XML_WRITER_OUTPUT_TYPE
output_type
;
struct
xmlbuf
*
output_buf
;
BOOL
output_buf_user
;
WS_HEAP
*
output_heap
;
const
WS_XML_DICTIONARY
*
dict
;
BOOL
dict_do_lookup
;
...
...
@@ -332,7 +333,7 @@ HRESULT WINAPI WsGetWriterProperty( WS_XML_WRITER *handle, WS_XML_WRITER_PROPERT
static
void
set_output_buffer
(
struct
writer
*
writer
,
struct
xmlbuf
*
xmlbuf
)
{
/* free current buffer if it's ours */
if
(
writer
->
output_buf
&&
writer
->
output_buf
->
heap
==
writer
->
output_heap
)
if
(
writer
->
output_buf
&&
!
writer
->
output_buf_user
)
{
free_xmlbuf
(
writer
->
output_buf
);
}
...
...
@@ -419,6 +420,7 @@ HRESULT WINAPI WsSetOutput( WS_XML_WRITER *handle, const WS_XML_WRITER_ENCODING
goto
done
;
}
set_output_buffer
(
writer
,
xmlbuf
);
writer
->
output_buf_user
=
FALSE
;
break
;
}
default:
...
...
@@ -472,6 +474,7 @@ HRESULT WINAPI WsSetOutputToBuffer( WS_XML_WRITER *handle, WS_XML_BUFFER *buffer
writer
->
output_enc
=
xmlbuf
->
encoding
;
writer
->
output_charset
=
xmlbuf
->
charset
;
set_output_buffer
(
writer
,
xmlbuf
);
writer
->
output_buf_user
=
TRUE
;
if
(
!
(
node
=
alloc_node
(
WS_XML_NODE_TYPE_BOF
)))
hr
=
E_OUTOFMEMORY
;
else
write_insert_bof
(
writer
,
node
);
...
...
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