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
6889c686
Commit
6889c686
authored
Apr 28, 2000
by
Juergen Schmied
Committed by
Alexandre Julliard
Apr 28, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fixes, removed asserts.
parent
edd77b93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
registry.c
misc/registry.c
+17
-7
No files found.
misc/registry.c
View file @
6889c686
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
#include <fcntl.h>
#include <fcntl.h>
#include <sys/fcntl.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <assert.h>
#include <time.h>
#include <time.h>
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
...
@@ -913,13 +912,24 @@ static _w95dkh * _w95_lookup_dkh (_w95creg *creg, int nrLS, int nrMS)
...
@@ -913,13 +912,24 @@ static _w95dkh * _w95_lookup_dkh (_w95creg *creg, int nrLS, int nrMS)
_w95dkh
*
dkh
;
_w95dkh
*
dkh
;
int
i
;
int
i
;
rgdb
=
(
_w95rgdb
*
)((
char
*
)
creg
+
creg
->
rgdb_off
);
/* get the beginning of the rgdb datastore */
/* get the beginning of the rgdb datastore */
assert
(
creg
->
rgdb_num
>
nrMS
);
/* check: requested block < last_block) */
rgdb
=
(
_w95rgdb
*
)((
char
*
)
creg
+
creg
->
rgdb_off
);
/* check: requested block < last_block) */
if
(
creg
->
rgdb_num
<=
nrMS
)
{
ERR
(
"registry file corrupt! requested block no. beyond end.
\n
"
);
goto
error
;
}
/* find the right block */
/* find the right block */
for
(
i
=
0
;
i
<
nrMS
;
i
++
)
for
(
i
=
0
;
i
<
nrMS
;
i
++
)
{
{
assert
(
rgdb
->
id
==
W95_REG_RGDB_ID
);
/* check the magic */
if
(
rgdb
->
id
!=
W95_REG_RGDB_ID
)
/* check the magic */
{
ERR
(
"registry file corrupt! bad magic 0x%08lx
\n
"
,
rgdb
->
id
);
goto
error
;
}
rgdb
=
(
_w95rgdb
*
)
((
char
*
)
rgdb
+
rgdb
->
size
);
/* find next block */
rgdb
=
(
_w95rgdb
*
)
((
char
*
)
rgdb
+
rgdb
->
size
);
/* find next block */
}
}
...
@@ -931,7 +941,7 @@ static _w95dkh * _w95_lookup_dkh (_w95creg *creg, int nrLS, int nrMS)
...
@@ -931,7 +941,7 @@ static _w95dkh * _w95_lookup_dkh (_w95creg *creg, int nrLS, int nrMS)
dkh
=
(
_w95dkh
*
)((
char
*
)
dkh
+
dkh
->
nextkeyoff
);
/* find next subblock */
dkh
=
(
_w95dkh
*
)((
char
*
)
dkh
+
dkh
->
nextkeyoff
);
/* find next subblock */
}
while
((
char
*
)
dkh
<
((
char
*
)
rgdb
+
rgdb
->
size
));
}
while
((
char
*
)
dkh
<
((
char
*
)
rgdb
+
rgdb
->
size
));
return
NULL
;
error:
return
NULL
;
}
}
/******************************************************************************
/******************************************************************************
...
@@ -956,7 +966,7 @@ static int _w95_parse_dkv (
...
@@ -956,7 +966,7 @@ static int _w95_parse_dkv (
{
{
name
=
_strdupnA
(
dkv
->
name
,
dkv
->
valnamelen
+
1
);
name
=
_strdupnA
(
dkv
->
name
,
dkv
->
valnamelen
+
1
);
ret
=
RegSetValueExA
(
hkey
,
name
,
0
,
dkv
->
type
,
&
(
dkv
->
name
[
dkv
->
valnamelen
]),
dkv
->
valdatalen
);
ret
=
RegSetValueExA
(
hkey
,
name
,
0
,
dkv
->
type
,
&
(
dkv
->
name
[
dkv
->
valnamelen
]),
dkv
->
valdatalen
);
if
(
ret
)
ERR
(
"RegSetValueEx failed (0x%08lx)
\n
"
,
ret
);
if
(
ret
)
FIXME
(
"RegSetValueEx returned: 0x%08lx
\n
"
,
ret
);
free
(
name
);
free
(
name
);
/* next value */
/* next value */
...
@@ -1090,7 +1100,7 @@ static int NativeRegLoadKey( HKEY hkey, char* fn, int level )
...
@@ -1090,7 +1100,7 @@ static int NativeRegLoadKey( HKEY hkey, char* fn, int level )
regf
=
base
;
regf
=
base
;
/* hbin block */
/* hbin block */
hbin
=
(
nt_hbin
*
)
((
char
*
)
base
+
0x1000
);
hbin
=
(
nt_hbin
*
)((
char
*
)
base
+
0x1000
);
if
(
hbin
->
id
!=
NT_REG_POOL_BLOCK_ID
)
if
(
hbin
->
id
!=
NT_REG_POOL_BLOCK_ID
)
{
{
ERR_
(
reg
)(
"%s hbin block invalid
\n
"
,
fn
);
ERR_
(
reg
)(
"%s hbin block invalid
\n
"
,
fn
);
...
...
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