[Spice-devel] [spice-server PATCH 2/8] image_encoders: check shared_dict before accessing it

2016-10-16 Thread Uri Lublin
In both image_encoders_restore_glz_dictionary() and image_encoders_get_glz_dictionary() shared-dict may be NULL if size is too large, and the server gets size from the network. Both functions end up calling glz_enc_dictionary_create() that calls glz_dictionary_window_create() where size is checked

[Spice-devel] [spice-server PATCH 1/8] current_remove: rename internal variable 'container'

2016-10-16 Thread Uri Lublin
It shadows the outer one. Signed-off-by: Uri Lublin --- Possibly more meaningful names than container and container2 should be used --- server/display-channel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index b

[Spice-devel] [spice-server PATCH 6/8] red_get_image_data_flat: allocate mem after sanity check

2016-10-16 Thread Uri Lublin
This patch prevents possible memory leak. Found by coverity. Signed-off-by: Uri Lublin --- server/red-parse-qxl.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index d75e27e..4dcf4ee 100644 --- a/server/red-parse-

[Spice-devel] [spice-server PATCH 8/8] red-record-qxl: child_output_setup: check fcntl return value

2016-10-16 Thread Uri Lublin
Also replaced "continue" in while block with an empty block (added curly braces). Found by coverity. Signed-off-by: Uri Lublin --- server/red-record-qxl.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/red-record-qxl.c b/server/red-record-qxl.c index adc487b..2

[Spice-devel] [spice-server PATCH 4/8] main-channel: getpeername/getsockname return early if no sockfd

2016-10-16 Thread Uri Lublin
I'm not sure that needed as it seems getpeername/getsockname accept int fd and return -1 for fd=-1 Signed-off-by: Uri Lublin --- server/main-channel.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/server/main-channel.c b/server/main-channel.c index bf84694

[Spice-devel] [spice-server PATCH 7/8] red-record-qxl: replace continue with empty block

2016-10-16 Thread Uri Lublin
Spice coding style suggests to use curly braces for while blocks. Signed-off-by: Uri Lublin --- server/red-record-qxl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/red-record-qxl.c b/server/red-record-qxl.c index 8af2c9c..adc487b 100644 --- a/server/red-record-

[Spice-devel] [spice-server PATCH 0/8] More coverity fixes

2016-10-16 Thread Uri Lublin
This patch-set contains mostly patches that fix/related-to coverity issues. Uri Lublin (8): current_remove: rename internal variable 'container' image_encoders: check shared_dict before accessing it input-channel: add a comment to mark fallthrough in switch main-channel: getpeername/getsoc

[Spice-devel] [spice-server PATCH 3/8] input-channel: add a comment to mark fallthrough in switch

2016-10-16 Thread Uri Lublin
Signed-off-by: Uri Lublin --- server/inputs-channel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/server/inputs-channel.c b/server/inputs-channel.c index 840d5e9..ee81bb4 100644 --- a/server/inputs-channel.c +++ b/server/inputs-channel.c @@ -285,6 +285,7 @@ static int inputs_channel_handl

[Spice-devel] [spice-server PATCH 5/8] mjpeg_encoder_new: allocate memory after sanity check

2016-10-16 Thread Uri Lublin
This patch prevents a leak in case the function returns early Found by coverity. Signed-off-by: Uri Lublin --- server/mjpeg-encoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/mjpeg-encoder.c b/server/mjpeg-encoder.c index 1649516..d95c645 100644 --- a/server/

Re: [Spice-devel] [PATCH v2 0/4] Protocol file syntax documentation

2016-10-16 Thread Pavel Grunt
Hi Victor, On Sat, 2016-10-15 at 15:38 +0200, Victor Toso wrote: > Hi, > > On Thu, Sep 29, 2016 at 12:28:44PM +0100, Frediano Ziglio wrote: > > Small update for this patchset: > > - fix headers in "Extended protocol documentation"; > > - added some more documentation on attributes. > > > > Fredi

Re: [Spice-devel] [PATCH spice-server v3 1/3] Add CommonGraphicsChannelPrivate struct

2016-10-16 Thread Pavel Grunt
On Fri, 2016-10-14 at 10:40 -0400, Frediano Ziglio wrote: > > > > From: Jonathon Jongsma > > > > Encapsulate private data for CommonGraphicsChannel and prepare for > > GObject conversion. > > --- > >  server/common-graphics-channel.c | 33 > > +++-- > >  server/common-