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
9d9c17de
Commit
9d9c17de
authored
Jan 18, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Reject empty queries.
parent
d72394e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
services.c
dlls/wbemprox/services.c
+1
-1
query.c
dlls/wbemprox/tests/query.c
+6
-0
No files found.
dlls/wbemprox/services.c
View file @
9d9c17de
...
...
@@ -527,7 +527,7 @@ static HRESULT WINAPI wbem_services_ExecQuery(
TRACE
(
"%p, %s, %s, 0x%08x, %p, %p
\n
"
,
iface
,
debugstr_w
(
strQueryLanguage
),
debugstr_w
(
strQuery
),
lFlags
,
pCtx
,
ppEnum
);
if
(
!
strQueryLanguage
||
!
strQuery
)
return
WBEM_E_INVALID_PARAMETER
;
if
(
!
strQueryLanguage
||
!
strQuery
||
!
strQuery
[
0
]
)
return
WBEM_E_INVALID_PARAMETER
;
if
(
strcmpiW
(
strQueryLanguage
,
wqlW
))
return
WBEM_E_INVALID_QUERY_TYPE
;
return
exec_query
(
strQuery
,
ppEnum
);
}
...
...
dlls/wbemprox/tests/query.c
View file @
9d9c17de
...
...
@@ -69,6 +69,7 @@ static HRESULT exec_query( IWbemServices *services, const WCHAR *str, IEnumWbemC
static
void
test_select
(
IWbemServices
*
services
)
{
static
const
WCHAR
emptyW
[]
=
{
0
};
static
const
WCHAR
sqlW
[]
=
{
'S'
,
'Q'
,
'L'
,
0
};
static
const
WCHAR
query1
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'H'
,
'O'
,
'T'
,
'F'
,
'I'
,
'X'
,
'I'
,
'D'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
...
...
@@ -113,6 +114,11 @@ static void test_select( IWbemServices *services )
hr
=
IWbemServices_ExecQuery
(
services
,
sql
,
NULL
,
0
,
NULL
,
&
result
);
ok
(
hr
==
WBEM_E_INVALID_PARAMETER
,
"query failed %08x
\n
"
,
hr
);
SysFreeString
(
query
);
query
=
SysAllocString
(
emptyW
);
hr
=
IWbemServices_ExecQuery
(
services
,
wql
,
query
,
0
,
NULL
,
&
result
);
ok
(
hr
==
WBEM_E_INVALID_PARAMETER
,
"query failed %08x
\n
"
,
hr
);
for
(
i
=
0
;
i
<
sizeof
(
test
)
/
sizeof
(
test
[
0
]);
i
++
)
{
hr
=
exec_query
(
services
,
test
[
i
],
&
result
);
...
...
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