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
87ab6e6c
Commit
87ab6e6c
authored
Dec 22, 2005
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 22, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Correct handling for all module names.
parent
b56ed222
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
16 deletions
+26
-16
module.c
dlls/dbghelp/module.c
+26
-16
No files found.
dlls/dbghelp/module.c
View file @
87ab6e6c
...
...
@@ -33,10 +33,27 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dbghelp
);
static
void
module_fill_module
(
const
char
*
in
,
char
*
out
,
unsigned
size
)
static
const
char
*
ext
[]
=
{
".acm"
,
".dll"
,
".drv"
,
".exe"
,
".ocx"
,
".vxd"
,
NULL
};
static
int
match_ext
(
const
char
*
ptr
,
size_t
len
)
{
const
char
**
e
;
size_t
l
;
for
(
e
=
ext
;
*
e
;
e
++
)
{
l
=
strlen
(
*
e
);
if
(
l
>=
len
)
return
FALSE
;
if
(
strncasecmp
(
&
ptr
[
len
-
l
],
*
e
,
l
))
continue
;
return
l
;
}
return
0
;
}
static
void
module_fill_module
(
const
char
*
in
,
char
*
out
,
size_t
size
)
{
const
char
*
ptr
,
*
endptr
;
unsigned
len
;
size_t
len
,
l
;
endptr
=
in
+
strlen
(
in
);
for
(
ptr
=
endptr
-
1
;
...
...
@@ -46,24 +63,17 @@ static void module_fill_module(const char* in, char* out, unsigned size)
len
=
min
(
endptr
-
ptr
,
size
-
1
);
memcpy
(
out
,
ptr
,
len
);
out
[
len
]
=
'\0'
;
if
(
len
>
4
&&
(
!
strcasecmp
(
&
out
[
len
-
4
],
".dll"
)
||
!
strcasecmp
(
&
out
[
len
-
4
],
".exe"
)))
out
[
len
-
4
]
=
'\0'
;
else
if
(((
len
>
12
&&
out
[
len
-
13
]
==
'/'
)
||
len
==
12
)
&&
if
(
len
>
4
&&
(
l
=
match_ext
(
out
,
len
)))
out
[
len
-
l
]
=
'\0'
;
else
if
(
len
>
12
&&
(
!
strcasecmp
(
out
+
len
-
12
,
"wine-pthread"
)
||
!
strcasecmp
(
out
+
len
-
12
,
"wine-kthread"
)))
lstrcpynA
(
out
,
"<wine-loader>"
,
size
);
lstrcpynA
(
out
,
"<wine-loader>"
,
size
);
else
{
if
(
len
>
7
&&
(
!
strcasecmp
(
&
out
[
len
-
7
],
".dll.so"
)
||
!
strcasecmp
(
&
out
[
len
-
7
],
".exe.so"
)))
strcpy
(
&
out
[
len
-
7
],
"<elf>"
);
else
if
(
len
>
7
&&
out
[
len
-
7
]
==
'.'
&&
!
strcasecmp
(
&
out
[
len
-
3
],
".so"
))
{
if
(
len
+
3
<
size
)
strcpy
(
&
out
[
len
-
3
],
"<elf>"
);
else
WARN
(
"Buffer too short: %s
\n
"
,
out
);
}
if
(
len
>
3
&&
!
strcasecmp
(
&
out
[
len
-
3
],
".so"
)
&&
(
l
=
match_ext
(
out
,
len
-
3
)))
strcpy
(
&
out
[
len
-
l
-
3
],
"<elf>"
);
}
while
((
*
out
=
tolower
(
*
out
)))
out
++
;
}
...
...
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