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
10973843
Commit
10973843
authored
Mar 04, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Avoid assigning values outside of the target_cpu enum range.
parent
f15d077f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
build.h
tools/winebuild/build.h
+1
-1
main.c
tools/winebuild/main.c
+5
-2
parser.c
tools/winebuild/parser.c
+1
-1
utils.c
tools/winebuild/utils.c
+1
-1
No files found.
tools/winebuild/build.h
View file @
10973843
...
...
@@ -262,7 +262,7 @@ extern DLLSPEC *alloc_dll_spec(void);
extern
void
free_dll_spec
(
DLLSPEC
*
spec
);
extern
const
char
*
make_c_identifier
(
const
char
*
str
);
extern
const
char
*
get_stub_name
(
const
ORDDEF
*
odp
,
const
DLLSPEC
*
spec
);
extern
enum
target_cpu
get_cpu_from_name
(
const
char
*
name
);
extern
int
get_cpu_from_name
(
const
char
*
name
);
extern
unsigned
int
get_alignment
(
unsigned
int
align
);
extern
unsigned
int
get_page_size
(
void
);
extern
unsigned
int
get_ptr_size
(
void
);
...
...
tools/winebuild/main.c
View file @
10973843
...
...
@@ -199,9 +199,12 @@ static void set_target( const char *target )
if
((
p
=
strchr
(
spec
,
'-'
)))
{
int
cpu
;
*
p
++
=
0
;
if
((
target_cpu
=
get_cpu_from_name
(
spec
))
==
-
1
)
fatal_error
(
"Unrecognized CPU '%s'
\n
"
,
spec
);
cpu
=
get_cpu_from_name
(
spec
);
if
(
cpu
==
-
1
)
fatal_error
(
"Unrecognized CPU '%s'
\n
"
,
spec
);
target_cpu
=
cpu
;
platform
=
p
;
if
((
p
=
strrchr
(
p
,
'-'
)))
platform
=
p
+
1
;
}
...
...
tools/winebuild/parser.c
View file @
10973843
...
...
@@ -473,7 +473,7 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
odp
->
flags
|=
FLAG_CPU_WIN64
;
else
{
enum
target_cpu
cpu
=
get_cpu_from_name
(
cpu_name
);
int
cpu
=
get_cpu_from_name
(
cpu_name
);
if
(
cpu
==
-
1
)
{
error
(
"Unknown architecture '%s'
\n
"
,
cpu_name
);
...
...
tools/winebuild/utils.c
View file @
10973843
...
...
@@ -869,7 +869,7 @@ const char *get_stub_name( const ORDDEF *odp, const DLLSPEC *spec )
}
/* parse a cpu name and return the corresponding value */
enum
target_cpu
get_cpu_from_name
(
const
char
*
name
)
int
get_cpu_from_name
(
const
char
*
name
)
{
unsigned
int
i
;
...
...
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