mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-13 13:29:47 -05:00
connection: Don't call memcpy with null pointer.
This commit is contained in:
parent
6c3e9b8f54
commit
5cff8244f2
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue