projects
/
profile
/
ivi
/
wayland.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6c3e9b8
)
connection: Don't call memcpy with null pointer.
author
John Kåre Alsaker
<john.kare.alsaker@gmail.com>
Fri, 12 Oct 2012 09:28:24 +0000
(11:28 +0200)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 16 Oct 2012 15:12:38 +0000
(11:12 -0400)
src/connection.c
patch
|
blob
|
history
diff --git
a/src/connection.c
b/src/connection.c
index
fdc9309
..
f2ef230
100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-517,12
+517,12
@@
wl_closure_vmarshal(struct wl_object *sender,
goto err;
*p++ = length;
goto err;
*p++ = length;
- if (length > 0)
+ if (length > 0) {
+ memcpy(p, s, length);
*sp = (const char *) p;
*sp = (const char *) p;
- else
+
}
else
*sp = NULL;
*sp = NULL;
- memcpy(p, s, length);
memset((char *) p + length, 0, aligned - length);
p += aligned / sizeof *p;
break;
memset((char *) p + length, 0, aligned - length);
p += aligned / sizeof *p;
break;