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
aa4e9c39
Commit
aa4e9c39
authored
Nov 28, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Fix parameters validation in FILE StartDocPort.
parent
604e7b4e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
localmon.c
dlls/localspl/localmon.c
+1
-1
localmon.c
dlls/localspl/tests/localmon.c
+11
-2
No files found.
dlls/localspl/localmon.c
View file @
aa4e9c39
...
...
@@ -509,7 +509,7 @@ static BOOL WINAPI localmon_StartDocPort(HANDLE hport, WCHAR *printer_name,
if
(
!
doc_info
||
!
doc_info
->
pOutputFile
)
{
FIXME
(
"set error
\n
"
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
dlls/localspl/tests/localmon.c
View file @
aa4e9c39
...
...
@@ -914,9 +914,18 @@ static void test_file_port(void)
ok
(
!
res
,
"WritePort succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"GetLastError() = %lu
\n
"
,
GetLastError
());
doc_info
.
pDocName
=
(
WCHAR
*
)
L"not used"
;
SetLastError
(
0xdeadbeef
);
res
=
pStartDocPort
(
hport
,
printer_name
,
1
,
1
,
NULL
);
ok
(
!
res
,
"StartDocPort succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"GetLastError() = %lu
\n
"
,
GetLastError
());
memset
(
&
doc_info
,
0
,
sizeof
(
doc_info
));
SetLastError
(
0xdeadbeef
);
res
=
pStartDocPort
(
hport
,
printer_name
,
1
,
1
,
(
BYTE
*
)
&
doc_info
);
ok
(
!
res
,
"StartDocPort succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"GetLastError() = %lu
\n
"
,
GetLastError
());
doc_info
.
pOutputFile
=
tempfileW
;
doc_info
.
pDatatype
=
(
WCHAR
*
)
L"not used"
;
res
=
pStartDocPort
(
hport
,
printer_name
,
1
,
1
,
(
BYTE
*
)
&
doc_info
);
ok
(
res
,
"StartDocPort failed (%lu)
\n
"
,
GetLastError
());
...
...
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