projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ccf08d
)
Marshall NULL strings correctly
author
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 8 Sep 2010 02:15:22 +0000
(22:15 -0400)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 8 Sep 2010 02:15:22 +0000
(22:15 -0400)
connection.c
patch
|
blob
|
history
diff --git
a/connection.c
b/connection.c
index 9893455c8795a32f5c6404d36668650c043d10d9..e0eee73d78767cb9a55d9797c2a78b09e6cca40b 100644
(file)
--- a/
connection.c
+++ b/
connection.c
@@
-400,7
+400,10
@@
wl_connection_vmarshal(struct wl_connection *connection,
length = s ? strlen(s) + 1: 0;
*p++ = length;
- *sp = (const char *) p;
+ if (length > 0)
+ *sp = (const char *) p;
+ else
+ *sp = NULL;
memcpy(p, s, length);
p += DIV_ROUNDUP(length, sizeof *p);