projects
/
profile
/
ivi
/
wayland.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f86338d
)
connection: Check object types in message parameters
author
Benjamin Franzke
<benjaminfranzke@googlemail.com>
Mon, 31 Oct 2011 10:06:35 +0000
(11:06 +0100)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Mon, 31 Oct 2011 15:13:13 +0000
(11:13 -0400)
src/connection.c
patch
|
blob
|
history
diff --git
a/src/connection.c
b/src/connection.c
index
1963314
..
a10508d
100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-594,6
+594,16
@@
wl_connection_demarshal(struct wl_connection *connection,
goto err;
}
+ if (*object != NULL && message->types[i-2] != NULL &&
+ (*object)->interface != message->types[i-2]) {
+ printf("invalid object (%d), type (%s), "
+ "message %s(%s)\n",
+ *p, (*object)->interface->name,
+ message->name, message->signature);
+ errno = EINVAL;
+ goto err;
+ }
+
p++;
break;
case 'n':