Increase closure buffer size and fail gracefully for too big closures.

Buffer size changed from 256 to 1024 bytes. Marshalling will now stop
if the buffer is not big enough.
This commit is contained in:
Laszlo Agocs 2011-12-16 10:29:36 +02:00 committed by Kristian Høgsberg
parent f598691831
commit 34901868b8
3 changed files with 38 additions and 6 deletions

View file

@ -198,6 +198,11 @@ wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...)
&proxy->object.interface->methods[opcode]);
va_end(ap);
if (closure == NULL) {
fprintf(stderr, "Error marshalling request\n");
abort();
}
wl_closure_send(closure, proxy->display->connection);
if (wl_debug)
@ -473,7 +478,7 @@ handle_event(struct wl_display *display,
size, &display->objects, message);
if (closure == NULL) {
fprintf(stderr, "Error demarshalling event: %m\n");
fprintf(stderr, "Error demarshalling event\n");
abort();
}