summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 21:38:33 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-21 13:24:17 +0100
commit15dba2901b8927f024c6f496a468557c8ea64119 (patch)
treed7c3dfed0d12c0067ac3a052231c7c7b949c95d0
parent3215ddd6cd73adef6d0a7774ece46c3526b0b26b (diff)
downloadspice-protocol-15dba2901b8927f024c6f496a468557c8ea64119.tar.gz
spice-protocol-15dba2901b8927f024c6f496a468557c8ea64119.tar.xz
spice-protocol-15dba2901b8927f024c6f496a468557c8ea64119.zip
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
-rw-r--r--spice.proto2
1 files changed, 1 insertions, 1 deletions
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 {