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
eb2bedc5
Commit
eb2bedc5
authored
Aug 01, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libport: Fixed invalid lvalue accesses in memmove.
parent
5d73cfda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
memmove.c
libs/port/memmove.c
+7
-6
No files found.
libs/port/memmove.c
View file @
eb2bedc5
...
@@ -22,25 +22,26 @@
...
@@ -22,25 +22,26 @@
#include "wine/port.h"
#include "wine/port.h"
#ifndef HAVE_MEMMOVE
#ifndef HAVE_MEMMOVE
void
*
memmove
(
void
*
dest
,
const
void
*
s
rc
,
size_t
len
)
void
*
memmove
(
void
*
dest
,
const
void
*
s
ource
,
size_t
len
)
{
{
register
char
*
dst
=
dest
;
register
char
*
dst
=
dest
;
register
const
char
*
src
=
source
;
/* Use memcpy if not overlapping */
/* Use memcpy if not overlapping */
if
((
dst
+
len
<=
(
char
*
)
src
)
||
((
char
*
)
src
+
len
<=
dst
))
if
((
dst
+
len
<=
src
)
||
(
src
+
len
<=
dst
))
{
{
memcpy
(
dst
,
src
,
len
);
memcpy
(
dst
,
src
,
len
);
}
}
/* Otherwise do it the hard way (FIXME: could do better than this) */
/* Otherwise do it the hard way (FIXME: could do better than this) */
else
if
(
dst
<
(
char
*
)
src
)
else
if
(
dst
<
src
)
{
{
while
(
len
--
)
*
dst
++
=
*
((
char
*
)
src
)
++
;
while
(
len
--
)
*
dst
++
=
*
src
++
;
}
}
else
else
{
{
dst
+=
len
-
1
;
dst
+=
len
-
1
;
src
=
(
char
*
)
src
+
len
-
1
;
src
+=
len
-
1
;
while
(
len
--
)
*
dst
--
=
*
((
char
*
)
src
)
--
;
while
(
len
--
)
*
dst
--
=
*
src
--
;
}
}
return
dest
;
return
dest
;
}
}
...
...
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