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
5f069c16
Commit
5f069c16
authored
May 02, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
May 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
krnl386.exe16: Do not omit mandatory argument for VirtualProtect.
parent
1119da47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
dosmem.c
dlls/krnl386.exe16/dosmem.c
+4
-2
dosvm.c
dlls/krnl386.exe16/dosvm.c
+2
-1
No files found.
dlls/krnl386.exe16/dosmem.c
View file @
5f069c16
...
...
@@ -302,6 +302,7 @@ BOOL DOSMEM_InitDosMemory(void)
{
static
BOOL
done
;
static
HANDLE
hRunOnce
;
DWORD
old_prot
;
if
(
done
)
return
TRUE
;
...
...
@@ -317,7 +318,7 @@ BOOL DOSMEM_InitDosMemory(void)
/* ok, we're the winning thread */
if
(
!
(
ret
=
VirtualProtect
(
DOSMEM_dosmem
+
DOSMEM_protect
,
DOSMEM_SIZE
-
DOSMEM_protect
,
PAGE_READWRITE
,
NULL
)))
PAGE_READWRITE
,
&
old_prot
)))
ERR
(
"Cannot load access low 1Mb, DOS subsystem unavailable
\n
"
);
RemoveVectoredExceptionHandler
(
vectored_handler
);
...
...
@@ -650,10 +651,11 @@ UINT DOSMEM_Available(void)
BOOL
DOSMEM_MapDosLayout
(
void
)
{
static
BOOL
already_mapped
;
DWORD
old_prot
;
if
(
!
already_mapped
)
{
if
(
DOSMEM_dosmem
||
!
VirtualProtect
(
NULL
,
DOSMEM_SIZE
,
PAGE_EXECUTE_READWRITE
,
NULL
))
if
(
DOSMEM_dosmem
||
!
VirtualProtect
(
NULL
,
DOSMEM_SIZE
,
PAGE_EXECUTE_READWRITE
,
&
old_prot
))
{
ERR
(
"Need full access to the first megabyte for DOS mode
\n
"
);
ExitProcess
(
1
);
...
...
dlls/krnl386.exe16/dosvm.c
View file @
5f069c16
...
...
@@ -827,6 +827,7 @@ LPVOID DOSVM_AllocDataUMB( DWORD size, WORD *segment, WORD *selector )
*/
void
DOSVM_InitSegments
(
void
)
{
DWORD
old_prot
;
LPSTR
ptr
;
int
i
;
...
...
@@ -966,7 +967,7 @@ void DOSVM_InitSegments(void)
/*
* As we store code in UMB we should make sure it is executable
*/
VirtualProtect
((
void
*
)
DOSVM_UMB_BOTTOM
,
DOSVM_UMB_TOP
-
DOSVM_UMB_BOTTOM
,
PAGE_EXECUTE_READWRITE
,
NULL
);
VirtualProtect
((
void
*
)
DOSVM_UMB_BOTTOM
,
DOSVM_UMB_TOP
-
DOSVM_UMB_BOTTOM
,
PAGE_EXECUTE_READWRITE
,
&
old_prot
);
event_notifier
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
}
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