summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-02-14 12:15:11 -0600
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2018-02-15 09:26:08 +0200
commit68398ec2cec755651a4d97a134241427670a5f34 (patch)
tree76ece189e058cda25eddb9f982287c99f8813ea8
parentwayland-egl: rename wl_egl_window::private to driver_private (diff)
downloadwayland-68398ec2cec755651a4d97a134241427670a5f34.tar
wayland-68398ec2cec755651a4d97a134241427670a5f34.tar.gz
wayland-68398ec2cec755651a4d97a134241427670a5f34.tar.bz2
wayland-68398ec2cec755651a4d97a134241427670a5f34.tar.lz
wayland-68398ec2cec755651a4d97a134241427670a5f34.tar.xz
wayland-68398ec2cec755651a4d97a134241427670a5f34.tar.zst
wayland-68398ec2cec755651a4d97a134241427670a5f34.zip
connection: Fix broken log message when demarshalling short closure
Like the similar wl_log() message further into this function that was fixed in commit 2fc248dc2c877d02694db40aad52180d71373d5a this should be printing the sender_id saved earlier instead of *p. Since p is incremented during the loop it would not only print an incorrect object id, it could read past the end of the array. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r--src/connection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/connection.c b/src/connection.c
index 5d5711f..294c521 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -710,7 +710,8 @@ wl_connection_demarshal(struct wl_connection *connection,
if (arg.type != 'h' && p + 1 > end) {
wl_log("message too short, "
"object (%d), message %s(%s)\n",
- *p, message->name, message->signature);
+ closure->sender_id, message->name,
+ message->signature);
errno = EINVAL;
goto err;
}