shm: Make sure the zero-sized array is always last in the struct
authorOlivier Crête <olivier.crete@collabora.com>
Thu, 28 Mar 2013 18:36:16 +0000 (14:36 -0400)
committerOlivier Crête <olivier.crete@collabora.com>
Thu, 28 Mar 2013 18:37:03 +0000 (14:37 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=696681

sys/shm/shmpipe.c

index 677113b..d721859 100644 (file)
@@ -115,10 +115,11 @@ struct _ShmBuffer
 
   ShmBuffer *next;
 
+  void *tag;
+
   int num_clients;
+  /* This must ALWAYS stay last in the struct */
   int clients[0];
-
-  void *tag;
 };