spice-common/common
Javier Celaya 7b146745ee Fix linearization of several marshallers with one item
The linearization optimization that avoids copying only one item must
check that there are no further marshallers in the chain.

Just to be clear, we are trying to marshall a message like this:

message {
    uint32 data_size;
    uint64 *data[data_size] @marshall;
} SomeData;

Where the data field points to an array in dynamic memory. Marshalling
and demarshalling functions look good. The marshalling function creates
a submarshaller for the data field and links it to the root marshaller.
But when it comes to sending the data through the wire, only the
data_size field gets sent. We have observed that, in
spice_marshaller_linearize, execution enters into the optimization that
avoids copying the data when the root marshaller only has one item, but
it ignores the following marshallers in the list. Checking if there are
more marshallers fixes the problem.
2015-09-15 17:38:12 +02:00
..
backtrace.c backtrace: Don't attempt to call seteuid(0) 2014-01-07 13:55:50 +01:00
backtrace.h common/backtrace: for mingw32 no pipe/wait_pid, just disable 2012-03-20 15:25:55 +01:00
bitops.h Remove INLINE usage 2013-10-04 12:45:00 +02:00
canvas_base.c Get rid of SW_CANVAS_IMAGE_CACHE 2015-03-26 10:15:04 +01:00
canvas_base.h Add support for A8 images to the LZ routines 2012-08-24 13:37:51 -04:00
canvas_utils.c LZ4: Add support for 24bit pixman surfaces 2015-02-03 10:46:34 +01:00
canvas_utils.h Use SPICE_{BEGIN,END}_DECLS 2012-03-20 15:30:23 +01:00
client_demarshallers.h build-sys: make it a seperately buildable spice-common library 2012-03-22 20:21:05 +01:00
client_marshallers.h Proto: Add preferred compression message and constants. 2015-06-22 19:54:30 +02:00
draw.h Add LZ4 image compression support. 2014-12-02 19:23:53 +01:00
gdi_canvas.c Get rid of SW_CANVAS_IMAGE_CACHE 2015-03-26 10:15:04 +01:00
gdi_canvas.h Remove need for SPICE_CANVAS_INTERNAL 2012-03-20 15:30:24 +01:00
gl_canvas.c Get rid of SW_CANVAS_IMAGE_CACHE 2015-03-26 10:15:04 +01:00
gl_canvas.h Get rid of SW_CANVAS_IMAGE_CACHE 2015-03-26 10:15:04 +01:00
gl_utils.h Use SPICE_{BEGIN,END}_DECLS 2012-03-20 15:30:23 +01:00
glc.c glc: Fix "warning: unused variable 'recreate'" 2014-11-24 11:24:49 +01:00
glc.h Use SPICE_{BEGIN,END}_DECLS 2012-03-20 15:30:23 +01:00
lines.c common: Fix -Wmissing-field-initializers 2014-09-18 13:15:35 +02:00
lines.h build-sys: make it a seperately buildable spice-common library 2012-03-22 20:21:05 +01:00
log.c common: Fix -Wsign-compare 2014-09-18 13:15:34 +02:00
log.h common/log.h: add spice_info 2012-07-05 19:22:31 +03:00
lz_common.h ppc: Fix lz magic endianess 2015-07-02 13:31:28 +02:00
lz_compress_tmpl.c Remove unused variable 2014-01-07 13:55:50 +01:00
lz_config.h common: use INLINE instead of inline 2012-03-20 15:25:53 +01:00
lz_decompress_tmpl.c Add support for A8 images to the LZ routines 2012-08-24 13:37:51 -04:00
lz.c ppc: Fix lz magic endianess 2015-07-02 13:31:28 +02:00
lz.h Add printf format annotations to all '...' functions 2012-03-20 15:30:24 +01:00
macros.h Fix min gcc version for __attribute__(format) 2013-08-20 10:38:07 +02:00
Makefile.am Use installed spice-protocol for code generation 2015-08-11 10:26:06 +02:00
marshaller.c Fix linearization of several marshallers with one item 2015-09-15 17:38:12 +02:00
marshaller.h Use SPICE_{BEGIN,END}_DECLS 2012-03-20 15:30:23 +01:00
mem.c Use a log handler to modify abort() behaviour 2012-03-20 15:30:23 +01:00
mem.h Use SPICE_{BEGIN,END}_DECLS 2012-03-20 15:30:23 +01:00
messages.h Proto: Add preferred compression message and constants. 2015-06-22 19:54:30 +02:00
ogl_ctx.c Use a log handler to modify abort() behaviour 2012-03-20 15:30:23 +01:00
ogl_ctx.h Use SPICE_{BEGIN,END}_DECLS 2012-03-20 15:30:23 +01:00
pixman_utils.c common: Fix -Wunused-parameter 2014-09-18 13:15:29 +02:00
pixman_utils.h Use SPICE_{BEGIN,END}_DECLS 2012-03-20 15:30:23 +01:00
quic_config.h Use SPICE_{BEGIN,END}_DECLS 2012-03-20 15:30:23 +01:00
quic_family_tmpl.c quic_family_tmpl: Fix "FORWARD_NULL" caught by coverity 2014-07-23 17:20:30 +02:00
quic_rgb_tmpl.c common: Fix -Wunused-parameter 2014-09-18 13:15:29 +02:00
quic_tmpl.c common: Fix -Wunused-parameter 2014-09-18 13:15:29 +02:00
quic.c ppc: Fix quic magic endianess 2015-07-02 13:31:28 +02:00
quic.h Add printf format annotations to all '...' functions 2012-03-20 15:30:24 +01:00
rect.h Remove INLINE usage 2013-10-04 12:45:00 +02:00
region.c region.c: fix region_bounds_intersects 2013-04-02 08:45:42 -04:00
region.h region: add region_extents 2012-05-02 14:47:27 +03:00
ring.h Use SPICE_{BEGIN,END}_DECLS 2012-03-20 15:30:23 +01:00
rop3.c common: Fix -Wunused-parameter 2014-09-18 13:15:29 +02:00
rop3.h Use SPICE_{BEGIN,END}_DECLS 2012-03-20 15:30:23 +01:00
snd_codec.c common: Fix -Wunused-variable 2014-10-23 14:54:48 +02:00
snd_codec.h Add support for the Opus codec. 2014-01-02 12:28:21 +01:00
spice_common.h Use a log handler to modify abort() behaviour 2012-03-20 15:30:23 +01:00
ssl_verify.c ssl: Don't use uninitialized variable in verify_subject() 2014-01-07 13:55:58 +01:00
ssl_verify.h ssl_verify: Move wincrypt.h related #ifdef closer to the include 2015-03-26 10:15:04 +01:00
sw_canvas.c Get rid of SW_CANVAS_IMAGE_CACHE 2015-03-26 10:15:04 +01:00
sw_canvas.h Get rid of SW_CANVAS_IMAGE_CACHE 2015-03-26 10:15:04 +01:00
verify.h Add compile-time check for lz arrays 2013-04-10 09:53:51 +02:00