Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6955b090
Commit
6955b090
authored
Nov 02, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Avoid a crash when serializing object text.
parent
815031d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
class.c
dlls/wbemprox/class.c
+12
-8
table.c
dlls/wbemprox/table.c
+1
-0
No files found.
dlls/wbemprox/class.c
View file @
6955b090
...
...
@@ -568,19 +568,23 @@ static BSTR get_body_text( const struct table *table, UINT row, UINT *len )
*
len
=
0
;
for
(
i
=
0
;
i
<
table
->
num_cols
;
i
++
)
{
*
len
+=
sizeof
(
fmtW
)
/
sizeof
(
fmtW
[
0
]);
*
len
+=
strlenW
(
table
->
columns
[
i
].
name
);
value
=
get_value_bstr
(
table
,
row
,
i
);
*
len
+=
SysStringLen
(
value
);
SysFreeString
(
value
);
if
((
value
=
get_value_bstr
(
table
,
row
,
i
)))
{
*
len
+=
sizeof
(
fmtW
)
/
sizeof
(
fmtW
[
0
]);
*
len
+=
strlenW
(
table
->
columns
[
i
].
name
);
*
len
+=
SysStringLen
(
value
);
SysFreeString
(
value
);
}
}
if
(
!
(
ret
=
SysAllocStringLen
(
NULL
,
*
len
)))
return
NULL
;
p
=
ret
;
for
(
i
=
0
;
i
<
table
->
num_cols
;
i
++
)
{
value
=
get_value_bstr
(
table
,
row
,
i
);
p
+=
sprintfW
(
p
,
fmtW
,
table
->
columns
[
i
].
name
,
value
);
SysFreeString
(
value
);
if
((
value
=
get_value_bstr
(
table
,
row
,
i
)))
{
p
+=
sprintfW
(
p
,
fmtW
,
table
->
columns
[
i
].
name
,
value
);
SysFreeString
(
value
);
}
}
return
ret
;
}
...
...
dlls/wbemprox/table.c
View file @
6955b090
...
...
@@ -166,6 +166,7 @@ BSTR get_value_bstr( const struct table *table, UINT row, UINT column )
case
CIM_DATETIME
:
case
CIM_STRING
:
if
(
!
val
)
return
NULL
;
len
=
strlenW
(
(
const
WCHAR
*
)(
INT_PTR
)
val
)
+
2
;
if
(
!
(
ret
=
SysAllocStringLen
(
NULL
,
len
)))
return
NULL
;
sprintfW
(
ret
,
fmt_strW
,
(
const
WCHAR
*
)(
INT_PTR
)
val
);
...
...
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