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
db98cc4c
Commit
db98cc4c
authored
Aug 18, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
Aug 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Handle unknown registry data types in the state machine.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
32d53681
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
import.c
programs/reg/import.c
+13
-1
No files found.
programs/reg/import.c
View file @
db98cc4c
...
...
@@ -75,6 +75,7 @@ enum parser_state
HEX_DATA
,
/* parsing REG_BINARY, REG_NONE, REG_EXPAND_SZ or REG_MULTI_SZ data */
EOL_BACKSLASH
,
/* preparing to parse multiple lines of hex data */
HEX_MULTILINE
,
/* parsing multiple lines of hex data */
UNKNOWN_DATA
,
/* parsing an unhandled or invalid data type */
SET_VALUE
,
/* adding a value to the registry */
NB_PARSER_STATES
};
...
...
@@ -112,6 +113,7 @@ static WCHAR *dword_data_state(struct parser *parser, WCHAR *pos);
static
WCHAR
*
hex_data_state
(
struct
parser
*
parser
,
WCHAR
*
pos
);
static
WCHAR
*
eol_backslash_state
(
struct
parser
*
parser
,
WCHAR
*
pos
);
static
WCHAR
*
hex_multiline_state
(
struct
parser
*
parser
,
WCHAR
*
pos
);
static
WCHAR
*
unknown_data_state
(
struct
parser
*
parser
,
WCHAR
*
pos
);
static
WCHAR
*
set_value_state
(
struct
parser
*
parser
,
WCHAR
*
pos
);
static
const
parser_state_func
parser_funcs
[
NB_PARSER_STATES
]
=
...
...
@@ -129,6 +131,7 @@ static const parser_state_func parser_funcs[NB_PARSER_STATES] =
hex_data_state
,
/* HEX_DATA */
eol_backslash_state
,
/* EOL_BACKSLASH */
hex_multiline_state
,
/* HEX_MULTILINE */
unknown_data_state
,
/* UNKNOWN_DATA */
set_value_state
,
/* SET_VALUE */
};
...
...
@@ -675,7 +678,7 @@ static WCHAR *data_type_state(struct parser *parser, WCHAR *pos)
set_state
(
parser
,
HEX_DATA
);
break
;
default:
set_state
(
parser
,
LINE_START
);
set_state
(
parser
,
UNKNOWN_DATA
);
}
return
line
;
...
...
@@ -794,6 +797,15 @@ invalid:
return
line
;
}
/* handler for parser UNKNOWN_DATA state */
static
WCHAR
*
unknown_data_state
(
struct
parser
*
parser
,
WCHAR
*
pos
)
{
FIXME
(
"Unknown registry data type [0x%x]
\n
"
,
parser
->
data_type
);
set_state
(
parser
,
LINE_START
);
return
pos
;
}
/* handler for parser SET_VALUE state */
static
WCHAR
*
set_value_state
(
struct
parser
*
parser
,
WCHAR
*
pos
)
{
...
...
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