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
c4433a06
Commit
c4433a06
authored
Apr 11, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe/tests: Avoid standard C functions in kernel drivers.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46993
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7b83b6b9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
driver.c
dlls/ntoskrnl.exe/tests/driver.c
+11
-5
No files found.
dlls/ntoskrnl.exe/tests/driver.c
View file @
c4433a06
...
...
@@ -59,9 +59,8 @@ static void kvprintf(const char *format, __ms_va_list ap)
{
static
char
buffer
[
512
];
IO_STATUS_BLOCK
io
;
_vsnprintf
(
buffer
,
sizeof
(
buffer
),
format
,
ap
);
ZwWriteFile
(
okfile
,
NULL
,
NULL
,
NULL
,
&
io
,
buffer
,
strlen
(
buffer
),
NULL
,
NULL
);
int
len
=
_vsnprintf
(
buffer
,
sizeof
(
buffer
),
format
,
ap
);
ZwWriteFile
(
okfile
,
NULL
,
NULL
,
NULL
,
&
io
,
buffer
,
len
,
NULL
,
NULL
);
}
static
void
WINAPIV
kprintf
(
const
char
*
format
,
...)
...
...
@@ -193,6 +192,13 @@ static void *kmemcpy(void *dest, const void *src, SIZE_T n)
return
dest
;
}
static
void
*
kmemset
(
void
*
dest
,
int
c
,
SIZE_T
n
)
{
unsigned
char
*
d
=
dest
;
while
(
n
--
)
*
d
++
=
(
unsigned
char
)
c
;
return
dest
;
}
static
void
*
get_proc_address
(
const
char
*
name
)
{
UNICODE_STRING
name_u
;
...
...
@@ -943,7 +949,7 @@ static void test_resource(void)
BOOLEAN
ret
;
HANDLE
thread
,
thread2
;
memset
(
&
resource
,
0xcc
,
sizeof
(
resource
));
k
memset
(
&
resource
,
0xcc
,
sizeof
(
resource
));
status
=
ExInitializeResourceLite
(
&
resource
);
ok
(
status
==
STATUS_SUCCESS
,
"got status %#x
\n
"
,
status
);
...
...
@@ -1230,7 +1236,7 @@ static NTSTATUS test_basic_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *
if
(
length
<
sizeof
(
teststr
))
return
STATUS_BUFFER_TOO_SMALL
;
strcpy
(
buffer
,
teststr
);
kmemcpy
(
buffer
,
teststr
,
sizeof
(
teststr
)
);
*
info
=
sizeof
(
teststr
);
return
STATUS_SUCCESS
;
...
...
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