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
b6c31bea
Commit
b6c31bea
authored
May 19, 2015
by
Thomas Faber
Committed by
Alexandre Julliard
May 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Use STATUS_BUFFER_TOO_SMALL for buffer overflows in RegQueryInfoKeyW.
parent
f4790714
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
registry.c
dlls/advapi32/registry.c
+1
-1
registry.c
dlls/advapi32/tests/registry.c
+2
-2
No files found.
dlls/advapi32/registry.c
View file @
b6c31bea
...
...
@@ -865,7 +865,7 @@ LSTATUS WINAPI RegQueryInfoKeyW( HKEY hkey, LPWSTR class, LPDWORD class_len, LPD
if
(
class_len
&&
(
info
->
ClassLength
/
sizeof
(
WCHAR
)
+
1
>
*
class_len
))
{
status
=
STATUS_BUFFER_
OVERFLOW
;
status
=
STATUS_BUFFER_
TOO_SMALL
;
}
else
{
...
...
dlls/advapi32/tests/registry.c
View file @
b6c31bea
...
...
@@ -1823,7 +1823,7 @@ static void test_reg_query_info(void)
memset
(
classbufferW
,
0x55
,
sizeof
(
classbufferW
));
classlen
=
1
;
ret
=
RegQueryInfoKeyW
(
subkey
,
classbufferW
,
&
classlen
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
ret
==
ERROR_INSUFFICIENT_BUFFER
,
"ret = %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_INSUFFICIENT_BUFFER
,
"ret = %d
\n
"
,
ret
);
ok
(
classlen
==
0
/* win8 */
||
classlen
==
strlen
(
subkey_class
),
"classlen = %u
\n
"
,
classlen
);
memset
(
expectbufferW
,
0x55
,
sizeof
(
expectbufferW
));
...
...
@@ -1846,7 +1846,7 @@ static void test_reg_query_info(void)
memset
(
classbufferW
,
0x55
,
sizeof
(
classbufferW
));
classlen
=
sizeof
(
subkey_class
)
-
1
;
ret
=
RegQueryInfoKeyW
(
subkey
,
classbufferW
,
&
classlen
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
ret
==
ERROR_INSUFFICIENT_BUFFER
,
"ret = %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_INSUFFICIENT_BUFFER
,
"ret = %d
\n
"
,
ret
);
ok
(
classlen
==
sizeof
(
subkey_class
)
-
2
/* win8 */
||
classlen
==
strlen
(
subkey_class
),
"classlen = %u
\n
"
,
classlen
);
memset
(
expectbufferW
,
0x55
,
sizeof
(
expectbufferW
));
...
...
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