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
b647ded0
Commit
b647ded0
authored
Jan 07, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Output incorrectly-terminated strings in hex format.
parent
fb9955da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
registry.c
server/registry.c
+25
-25
No files found.
server/registry.c
View file @
b647ded0
...
...
@@ -182,7 +182,7 @@ static void dump_path( const struct key *key, const struct key *base, FILE *f )
/* dump a value to a text file */
static
void
dump_value
(
const
struct
key_value
*
value
,
FILE
*
f
)
{
unsigned
int
i
;
unsigned
int
i
,
dw
;
int
count
;
if
(
value
->
namelen
)
...
...
@@ -198,37 +198,37 @@ static void dump_value( const struct key_value *value, FILE *f )
case
REG_SZ
:
case
REG_EXPAND_SZ
:
case
REG_MULTI_SZ
:
if
(
value
->
type
!=
REG_SZ
)
fprintf
(
f
,
"str(%d):"
,
value
->
type
);
/* only output properly terminated strings in string format */
if
(
value
->
len
<
sizeof
(
WCHAR
))
break
;
if
(
value
->
len
%
sizeof
(
WCHAR
))
break
;
if
(((
WCHAR
*
)
value
->
data
)[
value
->
len
/
sizeof
(
WCHAR
)
-
1
])
break
;
if
(
value
->
type
!=
REG_SZ
)
fprintf
(
f
,
"str(%x):"
,
value
->
type
);
fputc
(
'\"'
,
f
);
if
(
value
->
data
)
dump_strW
(
(
WCHAR
*
)
value
->
data
,
value
->
len
/
sizeof
(
WCHAR
),
f
,
"
\"\"
"
);
fputc
(
'\"'
,
f
);
break
;
fprintf
(
f
,
"
\"\n
"
);
return
;
case
REG_DWORD
:
if
(
value
->
len
==
sizeof
(
DWORD
))
{
DWORD
dw
;
memcpy
(
&
dw
,
value
->
data
,
sizeof
(
DWORD
)
)
;
fprintf
(
f
,
"dword:%08x"
,
dw
);
break
;
}
/* else fall through */
default:
if
(
value
->
type
==
REG_BINARY
)
count
+=
fprintf
(
f
,
"hex:"
);
else
count
+=
fprintf
(
f
,
"hex(%x):"
,
value
->
type
);
for
(
i
=
0
;
i
<
value
->
len
;
i
++
)
if
(
value
->
len
!=
sizeof
(
dw
))
break
;
memcpy
(
&
dw
,
value
->
data
,
sizeof
(
dw
)
);
fprintf
(
f
,
"dword:%08x
\n
"
,
dw
)
;
return
;
}
if
(
value
->
type
==
REG_BINARY
)
count
+=
fprintf
(
f
,
"hex:"
);
else
count
+=
fprintf
(
f
,
"hex(%x):"
,
value
->
type
);
for
(
i
=
0
;
i
<
value
->
len
;
i
++
)
{
count
+=
fprintf
(
f
,
"%02x"
,
*
((
unsigned
char
*
)
value
->
data
+
i
)
);
if
(
i
<
value
->
len
-
1
)
{
count
+=
fprintf
(
f
,
"%02x"
,
*
((
unsigned
char
*
)
value
->
data
+
i
)
);
if
(
i
<
value
->
len
-
1
)
fputc
(
','
,
f
);
if
(
++
count
>
76
)
{
fputc
(
','
,
f
);
if
(
++
count
>
76
)
{
fprintf
(
f
,
"
\\\n
"
);
count
=
2
;
}
fprintf
(
f
,
"
\\\n
"
);
count
=
2
;
}
}
break
;
}
fputc
(
'\n'
,
f
);
}
...
...
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