projects
/
profile
/
ivi
/
wayland.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
connection: Don't call memcpy with null pointer.
[profile/ivi/wayland.git]
/
src
/
connection.c
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;
- if (length > 0)
+ if (length > 0) {
+ memcpy(p, s, length);
*sp = (const char *) p;
- else
+
}
else
*sp = NULL;
- memcpy(p, s, length);
memset((char *) p + length, 0, aligned - length);
p += aligned / sizeof *p;
break;