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
ab8b2cfa
Commit
ab8b2cfa
authored
Jan 02, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jan 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Avoid an input buffer overrun in the empty console write test.
parent
536876af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
console.c
dlls/kernel32/tests/console.c
+3
-3
No files found.
dlls/kernel32/tests/console.c
View file @
ab8b2cfa
...
...
@@ -171,9 +171,9 @@ static void testCursorInfo(HANDLE hCon)
static
void
testEmptyWrite
(
HANDLE
hCon
)
{
static
const
char
emptybuf
[
16
];
COORD
c
;
DWORD
len
;
const
char
*
mytest
=
""
;
c
.
X
=
c
.
Y
=
0
;
ok
(
SetConsoleCursorPosition
(
hCon
,
c
)
!=
0
,
"Cursor in upper-left
\n
"
);
...
...
@@ -197,13 +197,13 @@ static void testEmptyWrite(HANDLE hCon)
}
len
=
-
1
;
ok
(
WriteConsole
(
hCon
,
mytest
,
0
,
&
len
,
NULL
)
!=
0
&&
len
==
0
,
"WriteConsole
\n
"
);
ok
(
WriteConsole
(
hCon
,
emptybuf
,
0
,
&
len
,
NULL
)
!=
0
&&
len
==
0
,
"WriteConsole
\n
"
);
okCURSOR
(
hCon
,
c
);
/* WriteConsole does not halt on a null terminator and is happy to write
* memory contents beyond the actual size of the buffer. */
len
=
-
1
;
ok
(
WriteConsole
(
hCon
,
mytest
,
16
,
&
len
,
NULL
)
!=
0
&&
len
==
16
,
"WriteConsole
\n
"
);
ok
(
WriteConsole
(
hCon
,
emptybuf
,
16
,
&
len
,
NULL
)
!=
0
&&
len
==
16
,
"WriteConsole
\n
"
);
c
.
X
+=
16
;
okCURSOR
(
hCon
,
c
);
}
...
...
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