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
20546c84
Commit
20546c84
authored
Oct 04, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Oct 04, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Check for string pointer being outside of the string table.
- Only parse typedefs on stabs entries that can have them.
parent
be7c95a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
15 deletions
+32
-15
stabs.c
dlls/dbghelp/stabs.c
+32
-15
No files found.
dlls/dbghelp/stabs.c
View file @
20546c84
...
@@ -1094,6 +1094,7 @@ BOOL stabs_parse(struct module* module, const char* addr,
...
@@ -1094,6 +1094,7 @@ BOOL stabs_parse(struct module* module, const char* addr,
unsigned
int
stabbufflen
;
unsigned
int
stabbufflen
;
const
struct
stab_nlist
*
stab_ptr
;
const
struct
stab_nlist
*
stab_ptr
;
const
char
*
strs
;
const
char
*
strs
;
const
char
*
strs_end
;
int
strtabinc
;
int
strtabinc
;
char
symname
[
4096
];
char
symname
[
4096
];
unsigned
incl
[
32
];
unsigned
incl
[
32
];
...
@@ -1107,6 +1108,7 @@ BOOL stabs_parse(struct module* module, const char* addr,
...
@@ -1107,6 +1108,7 @@ BOOL stabs_parse(struct module* module, const char* addr,
nstab
=
stablen
/
sizeof
(
struct
stab_nlist
);
nstab
=
stablen
/
sizeof
(
struct
stab_nlist
);
stab_ptr
=
(
const
struct
stab_nlist
*
)(
addr
+
staboff
);
stab_ptr
=
(
const
struct
stab_nlist
*
)(
addr
+
staboff
);
strs
=
(
const
char
*
)(
addr
+
strtaboff
);
strs
=
(
const
char
*
)(
addr
+
strtaboff
);
strs_end
=
strs
+
strtablen
;
memset
(
srcpath
,
0
,
sizeof
(
srcpath
));
memset
(
srcpath
,
0
,
sizeof
(
srcpath
));
memset
(
stabs_basic
,
0
,
sizeof
(
stabs_basic
));
memset
(
stabs_basic
,
0
,
sizeof
(
stabs_basic
));
...
@@ -1123,6 +1125,11 @@ BOOL stabs_parse(struct module* module, const char* addr,
...
@@ -1123,6 +1125,11 @@ BOOL stabs_parse(struct module* module, const char* addr,
for
(
i
=
0
;
i
<
nstab
;
i
++
,
stab_ptr
++
)
for
(
i
=
0
;
i
<
nstab
;
i
++
,
stab_ptr
++
)
{
{
ptr
=
strs
+
stab_ptr
->
n_un
.
n_strx
;
ptr
=
strs
+
stab_ptr
->
n_un
.
n_strx
;
if
((
ptr
>
strs_end
)
||
(
ptr
+
strlen
(
ptr
)
>
strs_end
))
{
WARN
(
"Bad stabs string %p
\n
"
,
ptr
);
continue
;
}
if
(
ptr
[
strlen
(
ptr
)
-
1
]
==
'\\'
)
if
(
ptr
[
strlen
(
ptr
)
-
1
]
==
'\\'
)
{
{
/*
/*
...
@@ -1145,23 +1152,33 @@ BOOL stabs_parse(struct module* module, const char* addr,
...
@@ -1145,23 +1152,33 @@ BOOL stabs_parse(struct module* module, const char* addr,
ptr
=
stabbuff
;
ptr
=
stabbuff
;
}
}
if
(
strchr
(
ptr
,
'='
)
!=
NULL
)
/* only symbol entries contain a typedef */
switch
(
stab_ptr
->
n_type
)
{
{
/*
case
N_GSYM
:
* The stabs aren't in writable memory, so copy it over so we are
case
N_LCSYM
:
* sure we can scribble on it.
case
N_STSYM
:
*/
case
N_RSYM
:
if
(
ptr
!=
stabbuff
)
case
N_LSYM
:
{
case
N_ROSYM
:
strcpy
(
stabbuff
,
ptr
);
if
(
strchr
(
ptr
,
'='
)
!=
NULL
)
ptr
=
stabbuff
;
}
stab_strcpy
(
symname
,
sizeof
(
symname
),
ptr
);
if
(
!
stabs_parse_typedef
(
module
,
ptr
,
symname
))
{
{
/* skip this definition */
/*
stabbuff
[
0
]
=
'\0'
;
* The stabs aren't in writable memory, so copy it over so we are
continue
;
* sure we can scribble on it.
*/
if
(
ptr
!=
stabbuff
)
{
strcpy
(
stabbuff
,
ptr
);
ptr
=
stabbuff
;
}
stab_strcpy
(
symname
,
sizeof
(
symname
),
ptr
);
if
(
!
stabs_parse_typedef
(
module
,
ptr
,
symname
))
{
/* skip this definition */
stabbuff
[
0
]
=
'\0'
;
continue
;
}
}
}
}
}
...
...
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