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
ee1cca51
Commit
ee1cca51
authored
Jul 10, 2008
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Jul 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Move more parameter-checks for EnumMonitorsW to localspl.
parent
775d4ebd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
localspl_main.c
dlls/localspl/localspl_main.c
+6
-4
info.c
dlls/winspool.drv/info.c
+1
-9
No files found.
dlls/localspl/localspl_main.c
View file @
ee1cca51
...
@@ -736,6 +736,12 @@ BOOL WINAPI fpEnumMonitors(LPWSTR pName, DWORD Level, LPBYTE pMonitors, DWORD cb
...
@@ -736,6 +736,12 @@ BOOL WINAPI fpEnumMonitors(LPWSTR pName, DWORD Level, LPBYTE pMonitors, DWORD cb
goto
em_cleanup
;
goto
em_cleanup
;
}
}
if
(
!
Level
||
(
Level
>
2
))
{
WARN
(
"level (%d) is ignored in win9x
\n
"
,
Level
);
SetLastError
(
ERROR_INVALID_LEVEL
);
return
FALSE
;
}
/* Scan all Monitor-Keys */
/* Scan all Monitor-Keys */
numentries
=
0
;
numentries
=
0
;
needed
=
get_local_monitors
(
Level
,
NULL
,
0
,
&
numentries
);
needed
=
get_local_monitors
(
Level
,
NULL
,
0
,
&
numentries
);
...
@@ -745,10 +751,6 @@ BOOL WINAPI fpEnumMonitors(LPWSTR pName, DWORD Level, LPBYTE pMonitors, DWORD cb
...
@@ -745,10 +751,6 @@ BOOL WINAPI fpEnumMonitors(LPWSTR pName, DWORD Level, LPBYTE pMonitors, DWORD cb
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
goto
em_cleanup
;
goto
em_cleanup
;
}
}
else
if
(
!
pMonitors
||
!
pcReturned
)
{
SetLastError
(
RPC_X_NULL_REF_POINTER
);
goto
em_cleanup
;
}
/* fill the Buffer with the Monitor-Keys */
/* fill the Buffer with the Monitor-Keys */
needed
=
get_local_monitors
(
Level
,
pMonitors
,
cbBuf
,
&
numentries
);
needed
=
get_local_monitors
(
Level
,
pMonitors
,
cbBuf
,
&
numentries
);
...
...
dlls/winspool.drv/info.c
View file @
ee1cca51
...
@@ -524,7 +524,6 @@ static BOOL CUPS_LoadPrinters(void)
...
@@ -524,7 +524,6 @@ static BOOL CUPS_LoadPrinters(void)
TRACE
(
"Printer already exists
\n
"
);
TRACE
(
"Printer already exists
\n
"
);
RegDeleteValueW
(
hkeyPrinter
,
May_Delete_Value
);
RegDeleteValueW
(
hkeyPrinter
,
May_Delete_Value
);
RegCloseKey
(
hkeyPrinter
);
RegCloseKey
(
hkeyPrinter
);
add_printer_driver
(
dests
[
i
].
name
);
}
else
{
}
else
{
static
CHAR
data_type
[]
=
"RAW"
,
static
CHAR
data_type
[]
=
"RAW"
,
print_proc
[]
=
"WinPrint"
,
print_proc
[]
=
"WinPrint"
,
...
@@ -662,7 +661,6 @@ PRINTCAP_ParseEntry(const char *pent, BOOL isfirst) {
...
@@ -662,7 +661,6 @@ PRINTCAP_ParseEntry(const char *pent, BOOL isfirst) {
TRACE
(
"Printer already exists
\n
"
);
TRACE
(
"Printer already exists
\n
"
);
RegDeleteValueW
(
hkeyPrinter
,
May_Delete_Value
);
RegDeleteValueW
(
hkeyPrinter
,
May_Delete_Value
);
RegCloseKey
(
hkeyPrinter
);
RegCloseKey
(
hkeyPrinter
);
add_printer_driver
(
devname
);
}
else
{
}
else
{
static
CHAR
data_type
[]
=
"RAW"
,
static
CHAR
data_type
[]
=
"RAW"
,
print_proc
[]
=
"WinPrint"
,
print_proc
[]
=
"WinPrint"
,
...
@@ -7246,13 +7244,7 @@ BOOL WINAPI EnumMonitorsW(LPWSTR pName, DWORD Level, LPBYTE pMonitors,
...
@@ -7246,13 +7244,7 @@ BOOL WINAPI EnumMonitorsW(LPWSTR pName, DWORD Level, LPBYTE pMonitors,
if
((
backend
==
NULL
)
&&
!
load_backend
())
return
FALSE
;
if
((
backend
==
NULL
)
&&
!
load_backend
())
return
FALSE
;
/* Level is not checked in win9x */
if
(
!
pcbNeeded
||
!
pcReturned
||
(
!
pMonitors
&&
(
cbBuf
>
0
)))
{
if
(
!
Level
||
(
Level
>
2
))
{
WARN
(
"level (%d) is ignored in win9x
\n
"
,
Level
);
SetLastError
(
ERROR_INVALID_LEVEL
);
return
FALSE
;
}
if
(
!
pcbNeeded
)
{
SetLastError
(
RPC_X_NULL_REF_POINTER
);
SetLastError
(
RPC_X_NULL_REF_POINTER
);
return
FALSE
;
return
FALSE
;
}
}
...
...
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