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
This commit is contained in:
Marc-André Lureau 2012-03-20 21:38:33 +01:00
parent 3215ddd6cd
commit 15dba2901b

View File

@ -225,7 +225,7 @@ channel MainChannel : BaseChannel {
message {
uint32 name_len;
uint8 name[name_len];
uint8 name[name_len] @end;
} name;
message {