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;
|
goto err;
|
||||||
*p++ = length;
|
*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);
|
memset((char *) p + length, 0, aligned - length);
|
||||||
p += aligned / sizeof *p;
|
p += aligned / sizeof *p;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue