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
dbd70d09
Commit
dbd70d09
authored
May 20, 2012
by
Eric Pouech
Committed by
Alexandre Julliard
May 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Protect COFF line number parsing against out of bounds access.
parent
e46d650d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
coff.c
dlls/dbghelp/coff.c
+18
-18
No files found.
dlls/dbghelp/coff.c
View file @
dbd70d09
...
@@ -424,26 +424,26 @@ DECLSPEC_HIDDEN BOOL coff_process_info(const struct msc_debug_info* msc_dbg)
...
@@ -424,26 +424,26 @@ DECLSPEC_HIDDEN BOOL coff_process_info(const struct msc_debug_info* msc_dbg)
* If we have spilled onto the next entrypoint, then
* If we have spilled onto the next entrypoint, then
* bump the counter..
* bump the counter..
*/
*/
for
(;
;
)
for
(;
l
+
1
<
coff_files
.
files
[
j
].
neps
;
l
++
)
{
{
if
(
l
+
1
>=
coff_files
.
files
[
j
].
neps
)
break
;
if
(
symt_get_address
(
coff_files
.
files
[
j
].
entries
[
l
+
1
],
&
addr
)
&&
symt_get_address
(
coff_files
.
files
[
j
].
entries
[
l
+
1
],
&
addr
);
msc_dbg
->
module
->
module
.
BaseOfImage
+
linepnt
->
Type
.
VirtualAddress
<
addr
)
if
(((
msc_dbg
->
module
->
module
.
BaseOfImage
+
linepnt
->
Type
.
VirtualAddress
)
<
addr
))
{
if
(
coff_files
.
files
[
j
].
entries
[
l
+
1
]
->
tag
==
SymTagFunction
)
{
/*
* Add the line number. This is always relative to the
* start of the function, so we need to subtract that offset
* first.
*/
symt_add_func_line
(
msc_dbg
->
module
,
(
struct
symt_function
*
)
coff_files
.
files
[
j
].
entries
[
l
+
1
],
coff_files
.
files
[
j
].
compiland
->
source
,
linepnt
->
Linenumber
,
msc_dbg
->
module
->
module
.
BaseOfImage
+
linepnt
->
Type
.
VirtualAddress
-
addr
);
}
break
;
break
;
l
++
;
}
}
if
(
coff_files
.
files
[
j
].
entries
[
l
+
1
]
->
tag
==
SymTagFunction
)
{
/*
* Add the line number. This is always relative to the
* start of the function, so we need to subtract that offset
* first.
*/
symt_get_address
(
coff_files
.
files
[
j
].
entries
[
l
+
1
],
&
addr
);
symt_add_func_line
(
msc_dbg
->
module
,
(
struct
symt_function
*
)
coff_files
.
files
[
j
].
entries
[
l
+
1
],
coff_files
.
files
[
j
].
compiland
->
source
,
linepnt
->
Linenumber
,
msc_dbg
->
module
->
module
.
BaseOfImage
+
linepnt
->
Type
.
VirtualAddress
-
addr
);
}
}
}
}
}
}
...
...
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