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
972a9495
Commit
972a9495
authored
Apr 18, 2005
by
Peter Berg Larsen
Committed by
Alexandre Julliard
Apr 18, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate strncpy and correct some NameLen bugs.
parent
716bf4d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
type.c
dlls/dbghelp/type.c
+6
-5
No files found.
dlls/dbghelp/type.c
View file @
972a9495
...
@@ -398,11 +398,12 @@ BOOL WINAPI SymEnumTypes(HANDLE hProcess, ULONG64 BaseOfDll,
...
@@ -398,11 +398,12 @@ BOOL WINAPI SymEnumTypes(HANDLE hProcess, ULONG64 BaseOfDll,
tmp
=
symt_get_name
(
type
);
tmp
=
symt_get_name
(
type
);
if
(
tmp
)
if
(
tmp
)
{
{
sym_info
->
NameLen
=
strlen
(
tmp
)
+
1
;
sym_info
->
NameLen
=
min
(
strlen
(
tmp
),
sym_info
->
MaxNameLen
-
1
);
strncpy
(
sym_info
->
Name
,
tmp
,
min
(
sym_info
->
NameLen
,
sym_info
->
MaxNameLen
));
memcpy
(
sym_info
->
Name
,
tmp
,
sym_info
->
NameLen
);
sym_info
->
Name
[
sym_info
->
MaxNameLen
-
1
]
=
'\0'
;
sym_info
->
Name
[
sym_info
->
NameLen
]
=
'\0'
;
}
}
else
sym_info
->
Name
[
sym_info
->
NameLen
=
0
]
=
'\0'
;
else
sym_info
->
Name
[
sym_info
->
NameLen
=
0
]
=
'\0'
;
if
(
!
EnumSymbolsCallback
(
sym_info
,
sym_info
->
Size
,
UserContext
))
break
;
if
(
!
EnumSymbolsCallback
(
sym_info
,
sym_info
->
Size
,
UserContext
))
break
;
}
}
return
TRUE
;
return
TRUE
;
...
...
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