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
6cee83a6
Commit
6cee83a6
authored
Nov 26, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Protect fetch_float() in CPU backends against buffer overflow.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0ed49fab
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
0 deletions
+4
-0
be_arm.c
programs/winedbg/be_arm.c
+1
-0
be_arm64.c
programs/winedbg/be_arm64.c
+1
-0
be_i386.c
programs/winedbg/be_i386.c
+1
-0
be_x86_64.c
programs/winedbg/be_x86_64.c
+1
-0
No files found.
programs/winedbg/be_arm.c
View file @
6cee83a6
...
@@ -1859,6 +1859,7 @@ static BOOL be_arm_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, d
...
@@ -1859,6 +1859,7 @@ static BOOL be_arm_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, d
/* FIXME: this assumes that debuggee and debugger use the same
/* FIXME: this assumes that debuggee and debugger use the same
* representation for reals
* representation for reals
*/
*/
if
(
size
>
sizeof
(
tmp
))
return
FALSE
;
if
(
!
memory_read_value
(
lvalue
,
size
,
tmp
))
return
FALSE
;
if
(
!
memory_read_value
(
lvalue
,
size
,
tmp
))
return
FALSE
;
if
(
size
==
sizeof
(
float
))
*
ret
=
*
(
float
*
)
tmp
;
if
(
size
==
sizeof
(
float
))
*
ret
=
*
(
float
*
)
tmp
;
...
...
programs/winedbg/be_arm64.c
View file @
6cee83a6
...
@@ -256,6 +256,7 @@ static BOOL be_arm64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
...
@@ -256,6 +256,7 @@ static BOOL be_arm64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
/* FIXME: this assumes that debuggee and debugger use the same
/* FIXME: this assumes that debuggee and debugger use the same
* representation for reals
* representation for reals
*/
*/
if
(
size
>
sizeof
(
tmp
))
return
FALSE
;
if
(
!
memory_read_value
(
lvalue
,
size
,
tmp
))
return
FALSE
;
if
(
!
memory_read_value
(
lvalue
,
size
,
tmp
))
return
FALSE
;
if
(
size
==
sizeof
(
float
))
*
ret
=
*
(
float
*
)
tmp
;
if
(
size
==
sizeof
(
float
))
*
ret
=
*
(
float
*
)
tmp
;
...
...
programs/winedbg/be_i386.c
View file @
6cee83a6
...
@@ -805,6 +805,7 @@ static BOOL be_i386_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
...
@@ -805,6 +805,7 @@ static BOOL be_i386_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
/* FIXME: this assumes that debuggee and debugger use the same
/* FIXME: this assumes that debuggee and debugger use the same
* representation for reals
* representation for reals
*/
*/
if
(
size
>
sizeof
(
tmp
))
return
FALSE
;
if
(
!
memory_read_value
(
lvalue
,
size
,
tmp
))
return
FALSE
;
if
(
!
memory_read_value
(
lvalue
,
size
,
tmp
))
return
FALSE
;
if
(
size
==
sizeof
(
float
))
*
ret
=
*
(
float
*
)
tmp
;
if
(
size
==
sizeof
(
float
))
*
ret
=
*
(
float
*
)
tmp
;
...
...
programs/winedbg/be_x86_64.c
View file @
6cee83a6
...
@@ -727,6 +727,7 @@ static BOOL be_x86_64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size
...
@@ -727,6 +727,7 @@ static BOOL be_x86_64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size
/* FIXME: this assumes that debuggee and debugger use the same
/* FIXME: this assumes that debuggee and debugger use the same
* representation for reals
* representation for reals
*/
*/
if
(
size
>
sizeof
(
tmp
))
return
FALSE
;
if
(
!
memory_read_value
(
lvalue
,
size
,
tmp
))
return
FALSE
;
if
(
!
memory_read_value
(
lvalue
,
size
,
tmp
))
return
FALSE
;
if
(
size
==
sizeof
(
float
))
*
ret
=
*
(
float
*
)
tmp
;
if
(
size
==
sizeof
(
float
))
*
ret
=
*
(
float
*
)
tmp
;
...
...
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