connection: Fix pointer arithmetic error
authorKristian Høgsberg <krh@bitplanet.net>
Tue, 7 Jun 2011 14:53:27 +0000 (10:53 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 7 Jun 2011 14:53:27 +0000 (10:53 -0400)
Pointed out by Nicolas Pouillon in irc.

wayland/connection.c

index 259a68c..e5893c3 100644 (file)
@@ -519,7 +519,7 @@ wl_connection_demarshal(struct wl_connection *connection,
 
        wl_connection_copy(connection, closure->buffer, size);
        p = &closure->buffer[2];
-       end = (uint32_t *) ((char *) (p + size));
+       end = (uint32_t *) ((char *) p + size);
        extra = (char *) end;
        for (i = 2; i < count; i++) {
                if (p + 1 > end) {