diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2012-10-12 11:28:24 +0200 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-10-16 11:12:38 -0400 |
| commit | 5cff8244f27c270cabb24f010ef76b0096a70872 (patch) | |
| tree | 67351b1bb60a64b02c35a159574bd7ecf0077061 | |
| parent | protocol: try to clarify wl_buffer doc (diff) | |
| download | wayland-5cff8244f27c270cabb24f010ef76b0096a70872.tar wayland-5cff8244f27c270cabb24f010ef76b0096a70872.tar.gz wayland-5cff8244f27c270cabb24f010ef76b0096a70872.tar.bz2 wayland-5cff8244f27c270cabb24f010ef76b0096a70872.tar.lz wayland-5cff8244f27c270cabb24f010ef76b0096a70872.tar.xz wayland-5cff8244f27c270cabb24f010ef76b0096a70872.tar.zst wayland-5cff8244f27c270cabb24f010ef76b0096a70872.zip | |
connection: Don't call memcpy with null pointer.
| -rw-r--r-- | src/connection.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/connection.c b/src/connection.c index fdc9309..f2ef230 100644 --- 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; |
