connection: Check object types in message parameters

This commit is contained in:
Benjamin Franzke 2011-10-31 11:06:35 +01:00 committed by Kristian Høgsberg
parent f86338d611
commit 3f1063f92a

View File

@ -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':