From 15dba2901b8927f024c6f496a468557c8ea64119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 20 Mar 2012 21:38:33 +0100 Subject: [PATCH] spice.proto: fix demarshaller crash with name message It turned out the demarshaller wasn't allocating enough space to memcpy the name. In order to take into account the size of a variable array, it needs to be marked with the @end tag so that the "extra_size" is added to the allocated memory. It would be nice if the demarshaller would somehow fail if this wasn't set explicitly, or do the right thing by default. @end the name so that demarshaller --- spice.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spice.proto b/spice.proto index e3feffa..513fe87 100644 --- a/spice.proto +++ b/spice.proto @@ -225,7 +225,7 @@ channel MainChannel : BaseChannel { message { uint32 name_len; - uint8 name[name_len]; + uint8 name[name_len] @end; } name; message {