mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-07 03:57:17 +00:00
test-marshallers.proto: ArrayMessage: make space for name
Do it by adding @end tag. Without it the allocated memory has no space for 'name'. Also fix SpiceMsgMainArrayMessage tests/test-marshallers.h, replacing int8_t* name with int8_t name[0]. This makes name an "in-structure" array with no pre-defined size instead of a pointer. The size is defined by the message size. Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
a52a0a0906
commit
01417b7533
@ -10,7 +10,7 @@ typedef struct {
|
||||
} SpiceMsgMainShortDataSubMarshall;
|
||||
|
||||
typedef struct {
|
||||
int8_t *name;
|
||||
int8_t name[0];
|
||||
} SpiceMsgMainArrayMessage;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@ -6,7 +6,7 @@ channel TestChannel {
|
||||
} ShortDataSubMarshall;
|
||||
|
||||
message {
|
||||
int8 name[];
|
||||
int8 name[] @end;
|
||||
} ArrayMessage;
|
||||
|
||||
message {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user