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
eb39956b
Commit
eb39956b
authored
Apr 02, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: IRegistrationInfo::put_URI() should accept NULL input.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
62ea0429
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
task.c
dlls/taskschd/task.c
+10
-5
scheduler.c
dlls/taskschd/tests/scheduler.c
+10
-0
No files found.
dlls/taskschd/task.c
View file @
eb39956b
...
...
@@ -728,15 +728,14 @@ static HRESULT WINAPI RegistrationInfo_get_URI(IRegistrationInfo *iface, BSTR *u
static
HRESULT
WINAPI
RegistrationInfo_put_URI
(
IRegistrationInfo
*
iface
,
BSTR
uri
)
{
registration_info
*
reginfo
=
impl_from_IRegistrationInfo
(
iface
);
WCHAR
*
str
=
NULL
;
TRACE
(
"%p,%s
\n
"
,
iface
,
debugstr_w
(
uri
));
if
(
!
uri
)
return
E_INVALIDARG
;
if
(
uri
&&
!
(
str
=
heap_strdupW
(
uri
)))
return
E_OUTOFMEMORY
;
heap_free
(
reginfo
->
uri
);
reginfo
->
uri
=
heap_strdupW
(
uri
);
/* FIXME: update XML on the server side */
return
reginfo
->
uri
?
S_OK
:
E_OUTOFMEMORY
;
reginfo
->
uri
=
str
;
return
S_OK
;
}
static
HRESULT
WINAPI
RegistrationInfo_get_SecurityDescriptor
(
IRegistrationInfo
*
iface
,
VARIANT
*
sddl
)
...
...
@@ -3336,6 +3335,12 @@ static HRESULT read_registration_info(IXmlReader *reader, IRegistrationInfo *inf
if
(
hr
==
S_OK
)
IRegistrationInfo_put_Documentation
(
info
,
value
);
}
else
if
(
!
lstrcmpW
(
name
,
URI
))
{
hr
=
read_text_value
(
reader
,
&
value
);
if
(
hr
==
S_OK
)
IRegistrationInfo_put_URI
(
info
,
value
);
}
else
FIXME
(
"unhandled RegistrationInfo element %s
\n
"
,
debugstr_w
(
name
));
...
...
dlls/taskschd/tests/scheduler.c
View file @
eb39956b
...
...
@@ -1428,6 +1428,7 @@ static void test_TaskDefinition(void)
" <Version>1.0</Version>
\n
"
" <Date>2018-04-02T11:22:33</Date>
\n
"
" <Documentation>doc</Documentation>
\n
"
" <URI>uri</URI>
\n
"
" </RegistrationInfo>
\n
"
" <Settings>
\n
"
" <Enabled>false</Enabled>
\n
"
...
...
@@ -1511,6 +1512,7 @@ static void test_TaskDefinition(void)
static
const
WCHAR
versionW
[]
=
{
'1'
,
'.'
,
'0'
,
0
};
static
const
WCHAR
dateW
[]
=
{
'2'
,
'0'
,
'1'
,
'8'
,
'-'
,
'0'
,
'4'
,
'-'
,
'0'
,
'2'
,
'T'
,
'1'
,
'1'
,
':'
,
'2'
,
'2'
,
':'
,
'3'
,
'3'
,
0
};
static
const
WCHAR
docW
[]
=
{
'd'
,
'o'
,
'c'
,
0
};
static
const
WCHAR
uriW
[]
=
{
'u'
,
'r'
,
'i'
,
0
};
static
WCHAR
Task1
[]
=
{
'"'
,
'T'
,
'a'
,
's'
,
'k'
,
'1'
,
'"'
,
0
};
static
struct
settings
def_settings
=
{
{
0
},
{
'P'
,
'T'
,
'7'
,
'2'
,
'H'
,
0
},
{
0
},
0
,
7
,
TASK_INSTANCES_IGNORE_NEW
,
TASK_COMPATIBILITY_V2
,
VARIANT_TRUE
,
VARIANT_TRUE
,
...
...
@@ -1663,7 +1665,15 @@ todo_wine
hr
=
IRegistrationInfo_get_URI
(
reginfo
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_URI error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
uriW
),
"expected %s, got %s
\n
"
,
wine_dbgstr_w
(
uriW
),
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
IRegistrationInfo_put_URI
(
reginfo
,
NULL
);
ok
(
hr
==
S_OK
,
"put_URI error %#x
\n
"
,
hr
);
bstr
=
(
BSTR
)
0xdeadbeef
;
hr
=
IRegistrationInfo_get_URI
(
reginfo
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_URI error %#x
\n
"
,
hr
);
ok
(
!
bstr
,
"expected NULL, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
hr
=
IRegistrationInfo_get_Source
(
reginfo
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Source error %#x
\n
"
,
hr
);
ok
(
!
bstr
,
"expected NULL, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
...
...
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