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
14967933
Commit
14967933
authored
Mar 01, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Fix another buffer overflow compiler warning.
parent
d5468b9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
mapping.c
server/mapping.c
+4
-3
No files found.
server/mapping.c
View file @
14967933
...
...
@@ -1192,7 +1192,6 @@ DECL_HANDLER(map_view)
{
struct
mapping
*
mapping
=
NULL
;
struct
memory_view
*
view
;
data_size_t
namelen
=
0
;
if
(
!
req
->
size
||
(
req
->
base
&
page_mask
)
||
req
->
base
+
req
->
size
<
req
->
base
)
/* overflow */
{
...
...
@@ -1211,6 +1210,8 @@ DECL_HANDLER(map_view)
if
(
!
req
->
mapping
)
/* image mapping for a .so dll */
{
data_size_t
namelen
=
0
;
if
(
get_req_data_size
()
>
sizeof
(
view
->
image
))
namelen
=
get_req_data_size
()
-
sizeof
(
view
->
image
);
if
(
!
(
view
=
mem_alloc
(
sizeof
(
struct
memory_view
)
+
namelen
*
sizeof
(
WCHAR
)
)))
return
;
memset
(
view
,
0
,
sizeof
(
*
view
)
);
...
...
@@ -1243,13 +1244,13 @@ DECL_HANDLER(map_view)
goto
done
;
}
if
((
view
=
mem_alloc
(
offsetof
(
struct
memory_view
,
name
[
namelen
]
)
)))
if
((
view
=
mem_alloc
(
sizeof
(
*
view
)
)))
{
view
->
base
=
req
->
base
;
view
->
size
=
req
->
size
;
view
->
start
=
req
->
start
;
view
->
flags
=
mapping
->
flags
;
view
->
namelen
=
namelen
;
view
->
namelen
=
0
;
view
->
fd
=
!
is_fd_removable
(
mapping
->
fd
)
?
(
struct
fd
*
)
grab_object
(
mapping
->
fd
)
:
NULL
;
view
->
committed
=
mapping
->
committed
?
(
struct
ranges
*
)
grab_object
(
mapping
->
committed
)
:
NULL
;
view
->
shared
=
mapping
->
shared
?
(
struct
shared_map
*
)
grab_object
(
mapping
->
shared
)
:
NULL
;
...
...
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