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
9ae103f7
Commit
9ae103f7
authored
Aug 27, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Respect string length returned from ISAXAttributes.
parent
d0413fd4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
mxwriter.c
dlls/msxml3/mxwriter.c
+4
-3
saxreader.c
dlls/msxml3/tests/saxreader.c
+6
-6
No files found.
dlls/msxml3/mxwriter.c
View file @
9ae103f7
...
@@ -782,7 +782,7 @@ static HRESULT WINAPI mxwriter_saxcontent_startElement(
...
@@ -782,7 +782,7 @@ static HRESULT WINAPI mxwriter_saxcontent_startElement(
for
(
i
=
0
;
i
<
length
;
i
++
)
for
(
i
=
0
;
i
<
length
;
i
++
)
{
{
const
WCHAR
*
str
;
const
WCHAR
*
str
;
INT
len
;
INT
len
=
0
;
hr
=
ISAXAttributes_getQName
(
attr
,
i
,
&
str
,
&
len
);
hr
=
ISAXAttributes_getQName
(
attr
,
i
,
&
str
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
FAILED
(
hr
))
return
hr
;
...
@@ -790,16 +790,17 @@ static HRESULT WINAPI mxwriter_saxcontent_startElement(
...
@@ -790,16 +790,17 @@ static HRESULT WINAPI mxwriter_saxcontent_startElement(
/* space separator in front of every attribute */
/* space separator in front of every attribute */
xmlOutputBufferWriteString
(
This
->
buffer
,
" "
);
xmlOutputBufferWriteString
(
This
->
buffer
,
" "
);
s
=
xmlchar_from_wchar
(
str
);
s
=
xmlchar_from_wchar
n
(
str
,
len
);
xmlOutputBufferWriteString
(
This
->
buffer
,
(
char
*
)
s
);
xmlOutputBufferWriteString
(
This
->
buffer
,
(
char
*
)
s
);
heap_free
(
s
);
heap_free
(
s
);
xmlOutputBufferWriteString
(
This
->
buffer
,
"=
\"
"
);
xmlOutputBufferWriteString
(
This
->
buffer
,
"=
\"
"
);
len
=
0
;
hr
=
ISAXAttributes_getValue
(
attr
,
i
,
&
str
,
&
len
);
hr
=
ISAXAttributes_getValue
(
attr
,
i
,
&
str
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
FAILED
(
hr
))
return
hr
;
s
=
xmlchar_from_wchar
(
str
);
s
=
xmlchar_from_wchar
n
(
str
,
len
);
xmlOutputBufferWriteString
(
This
->
buffer
,
(
char
*
)
s
);
xmlOutputBufferWriteString
(
This
->
buffer
,
(
char
*
)
s
);
heap_free
(
s
);
heap_free
(
s
);
...
...
dlls/msxml3/tests/saxreader.c
View file @
9ae103f7
...
@@ -567,13 +567,13 @@ static HRESULT WINAPI isaxattributes_getQName(
...
@@ -567,13 +567,13 @@ static HRESULT WINAPI isaxattributes_getQName(
const
WCHAR
**
pQName
,
const
WCHAR
**
pQName
,
int
*
pQNameLength
)
int
*
pQNameLength
)
{
{
static
const
WCHAR
attr1W
[]
=
{
'a'
,
':'
,
'a'
,
't'
,
't'
,
'r'
,
'1'
,
0
};
static
const
WCHAR
attr1W
[]
=
{
'a'
,
':'
,
'a'
,
't'
,
't'
,
'r'
,
'1'
,
'j'
,
'u'
,
'n'
,
'k'
,
0
};
static
const
WCHAR
attr2W
[]
=
{
'a'
,
't'
,
't'
,
'r'
,
'2'
,
0
};
static
const
WCHAR
attr2W
[]
=
{
'a'
,
't'
,
't'
,
'r'
,
'2'
,
'j'
,
'u'
,
'n'
,
'k'
,
0
};
ok
(
nIndex
==
0
||
nIndex
==
1
,
"invalid index received %d
\n
"
,
nIndex
);
ok
(
nIndex
==
0
||
nIndex
==
1
,
"invalid index received %d
\n
"
,
nIndex
);
*
pQName
=
(
nIndex
==
0
)
?
attr1W
:
attr2W
;
*
pQName
=
(
nIndex
==
0
)
?
attr1W
:
attr2W
;
*
pQNameLength
=
lstrlenW
(
*
pQName
)
;
*
pQNameLength
=
(
nIndex
==
0
)
?
7
:
5
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -654,13 +654,13 @@ static HRESULT WINAPI isaxattributes_getValue(
...
@@ -654,13 +654,13 @@ static HRESULT WINAPI isaxattributes_getValue(
const
WCHAR
**
pValue
,
const
WCHAR
**
pValue
,
int
*
nValue
)
int
*
nValue
)
{
{
static
const
WCHAR
attrval1W
[]
=
{
'a'
,
'1'
,
0
};
static
const
WCHAR
attrval1W
[]
=
{
'a'
,
'1'
,
'j'
,
'u'
,
'n'
,
'k'
,
0
};
static
const
WCHAR
attrval2W
[]
=
{
'a'
,
'2'
,
0
};
static
const
WCHAR
attrval2W
[]
=
{
'a'
,
'2'
,
'j'
,
'u'
,
'n'
,
'k'
,
0
};
ok
(
nIndex
==
0
||
nIndex
==
1
,
"invalid index received %d
\n
"
,
nIndex
);
ok
(
nIndex
==
0
||
nIndex
==
1
,
"invalid index received %d
\n
"
,
nIndex
);
*
pValue
=
(
nIndex
==
0
)
?
attrval1W
:
attrval2W
;
*
pValue
=
(
nIndex
==
0
)
?
attrval1W
:
attrval2W
;
*
nValue
=
lstrlenW
(
*
pValue
)
;
*
nValue
=
2
;
return
S_OK
;
return
S_OK
;
}
}
...
...
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