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
feda40bb
Commit
feda40bb
authored
Oct 09, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 09, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite: Fix overwriting of dest buffer when pushing more data to it.
parent
ae341b9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
reader.c
dlls/xmllite/reader.c
+4
-4
No files found.
dlls/xmllite/reader.c
View file @
feda40bb
...
...
@@ -703,7 +703,7 @@ static HRESULT readerinput_growraw(xmlreaderinput *readerinput)
read
=
0
;
hr
=
ISequentialStream_Read
(
readerinput
->
stream
,
buffer
->
data
+
buffer
->
written
,
len
,
&
read
);
TRACE
(
"
requested %d, read %d, ret 0x%08x
\n
"
,
len
,
read
,
hr
);
TRACE
(
"
written=%d, alloc=%d, requested=%d, read=%d, ret=0x%08x
\n
"
,
buffer
->
written
,
buffer
->
allocated
,
len
,
read
,
hr
);
readerinput
->
pending
=
hr
==
E_PENDING
;
if
(
FAILED
(
hr
))
return
hr
;
buffer
->
written
+=
read
;
...
...
@@ -903,14 +903,14 @@ static HRESULT reader_more(xmlreader *reader)
if
(
cp
==
~
0
)
{
readerinput_grow
(
readerinput
,
len
);
memcpy
(
dest
->
data
,
src
->
data
+
src
->
cur
,
len
);
memcpy
(
dest
->
data
+
dest
->
written
,
src
->
data
+
src
->
cur
,
len
);
dest
->
written
+=
len
*
sizeof
(
WCHAR
);
return
hr
;
}
dest_len
=
MultiByteToWideChar
(
cp
,
0
,
src
->
data
+
src
->
cur
,
len
,
NULL
,
0
);
readerinput_grow
(
readerinput
,
dest_len
);
ptr
=
(
WCHAR
*
)
dest
->
data
;
ptr
=
(
WCHAR
*
)
(
dest
->
data
+
dest
->
written
)
;
MultiByteToWideChar
(
cp
,
0
,
src
->
data
+
src
->
cur
,
len
,
ptr
,
dest_len
);
ptr
[
dest_len
]
=
0
;
dest
->
written
+=
dest_len
*
sizeof
(
WCHAR
);
...
...
@@ -930,7 +930,7 @@ static inline WCHAR *reader_get_ptr(xmlreader *reader)
encoded_buffer
*
buffer
=
&
reader
->
input
->
buffer
->
utf16
;
WCHAR
*
ptr
=
(
WCHAR
*
)
buffer
->
data
+
buffer
->
cur
;
if
(
!*
ptr
)
reader_more
(
reader
);
return
pt
r
;
return
(
WCHAR
*
)
buffer
->
data
+
buffer
->
cu
r
;
}
static
int
reader_cmp
(
xmlreader
*
reader
,
const
WCHAR
*
str
)
...
...
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