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
935cc798
Commit
935cc798
authored
Apr 02, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Update the registry key and value name length limits to the now documented values.
parent
b3ad91f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
reg.c
dlls/ntdll/reg.c
+7
-5
registry.c
server/registry.c
+2
-2
No files found.
dlls/ntdll/reg.c
View file @
935cc798
...
...
@@ -42,8 +42,10 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
reg
);
/* maximum length of a key/value name in bytes (without terminating null) */
#define MAX_NAME_LENGTH ((MAX_PATH-1) * sizeof(WCHAR))
/* maximum length of a key name in bytes (without terminating null) */
#define MAX_NAME_LENGTH (255 * sizeof(WCHAR))
/* maximum length of a value name in bytes (without terminating null) */
#define MAX_VALUE_LENGTH (16383 * sizeof(WCHAR))
/******************************************************************************
* NtCreateKey [NTDLL.@]
...
...
@@ -188,7 +190,7 @@ NTSTATUS WINAPI NtDeleteValueKey( HANDLE hkey, const UNICODE_STRING *name )
NTSTATUS
ret
;
TRACE
(
"(%p,%s)
\n
"
,
hkey
,
debugstr_us
(
name
)
);
if
(
name
->
Length
>
MAX_
NAM
E_LENGTH
)
return
STATUS_BUFFER_OVERFLOW
;
if
(
name
->
Length
>
MAX_
VALU
E_LENGTH
)
return
STATUS_BUFFER_OVERFLOW
;
SERVER_START_REQ
(
delete_key_value
)
{
...
...
@@ -481,7 +483,7 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name,
TRACE
(
"(%p,%s,%d,%p,%d)
\n
"
,
handle
,
debugstr_us
(
name
),
info_class
,
info
,
length
);
if
(
name
->
Length
>
MAX_
NAM
E_LENGTH
)
return
STATUS_BUFFER_OVERFLOW
;
if
(
name
->
Length
>
MAX_
VALU
E_LENGTH
)
return
STATUS_BUFFER_OVERFLOW
;
/* compute the length we want to retrieve */
switch
(
info_class
)
...
...
@@ -769,7 +771,7 @@ NTSTATUS WINAPI NtSetValueKey( HANDLE hkey, const UNICODE_STRING *name, ULONG Ti
TRACE
(
"(%p,%s,%d,%p,%d)
\n
"
,
hkey
,
debugstr_us
(
name
),
type
,
data
,
count
);
if
(
name
->
Length
>
MAX_
NAM
E_LENGTH
)
return
STATUS_BUFFER_OVERFLOW
;
if
(
name
->
Length
>
MAX_
VALU
E_LENGTH
)
return
STATUS_BUFFER_OVERFLOW
;
SERVER_START_REQ
(
set_key_value
)
{
...
...
server/registry.c
View file @
935cc798
...
...
@@ -100,8 +100,8 @@ struct key_value
#define MIN_SUBKEYS 8
/* min. number of allocated subkeys per key */
#define MIN_VALUES 8
/* min. number of allocated values per key */
#define MAX_NAME_LEN
MAX_PATH
/* max. length of a key name */
#define MAX_VALUE_LEN
MAX_PATH
/* max. length of a value name */
#define MAX_NAME_LEN
255
/* max. length of a key name */
#define MAX_VALUE_LEN
16383
/* max. length of a value name */
/* the root of the registry tree */
static
struct
key
*
root_key
;
...
...
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