Re: [Spice-devel] "undefined reference" errors while running make

2016-04-04 Thread Pavel Grunt
Hi, On Mon, 2016-04-04 at 09:59 +0200, Christophe Fergeau wrote: > On Sat, Apr 02, 2016 at 02:14:11PM +, Mahmood Naderan wrote: > > > > Hi Eduardo,I have to say that the latest git revision doesn't > > include your patch.  So, I applied your patch manually into the > > latest revision. > > Th

Re: [Spice-devel] [spice-gtk PATCH] Usbredir: enable lz4 compression

2016-04-04 Thread Victor Toso
Hi, You'll need to rebase this series to latest master. Both spice-gtk and spice-server patches don't apply. On Sun, Apr 03, 2016 at 06:40:09PM +0300, Snir Sheriber wrote: > Compressed message type is CompressedData which contains compression > type (1 byte) followed by the uncompressed data size

Re: [Spice-devel] [spice-gtk 3/4] coverity: avoid out of bounds access

2016-04-04 Thread Christophe Fergeau
On Mon, Apr 04, 2016 at 10:02:08AM +0200, Fabiano Fidêncio wrote: > --- > src/controller/test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/controller/test.c b/src/controller/test.c > index 649aca5..2909b06 100644 > --- a/src/controller/test.c > +++ b/src/controll

Re: [Spice-devel] [spice-gtk 1/4] coverity: fix unitialized use of mem.data

2016-04-04 Thread Christophe Fergeau
Where is the mem.data use you mention? In the memcpy? Christophe On Mon, Apr 04, 2016 at 09:59:50AM +0200, Fabiano Fidêncio wrote: > --- > src/channel-main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/channel-main.c b/src/channel-main.c > index 4a1f58a..93537d2

Re: [Spice-devel] [spice-common 7/8] coverity: remove structurally dead code

2016-04-04 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Apr 04, 2016 at 10:03:38AM +0200, Fabiano Fidêncio wrote: > The loop (for (;;)) will be executed only once, so, no reason for > keeping it. > --- > common/lz_compress_tmpl.c | 19 --- > 1 file changed, 8 insertions(+), 11 deletions(-) > > di

Re: [Spice-devel] [spice-common 6/8] coverity: remove unused value

2016-04-04 Thread Christophe Fergeau
Acked-by: Christophe Fergeau (this code has been there forever in git, so this is not caused by some buggy modification to it). On Mon, Apr 04, 2016 at 10:03:37AM +0200, Fabiano Fidêncio wrote: > len is overwritten in the match label with the value from > "ip - anchor". > --- > common/lz_compre

Re: [Spice-devel] [spice-common 4/8] coverity: avoid dereference after null check

2016-04-04 Thread Christophe Fergeau
On Mon, Apr 04, 2016 at 10:03:35AM +0200, Fabiano Fidêncio wrote: > All decompress functions used after this check take into account that > encoder->palette is not NULL. So, if we already detected that the > palette is NULL, let's just return early. > --- > common/lz.c | 1 + > 1 file changed, 1 i

Re: [Spice-devel] [spice-common 4/8] coverity: avoid dereference after null check

2016-04-04 Thread Victor Toso
Hi, On Mon, Apr 04, 2016 at 10:03:35AM +0200, Fabiano Fidêncio wrote: > All decompress functions used after this check take into account that > encoder->palette is not NULL. So, if we already detected that the > palette is NULL, let's just return early. Acked-by: Victor Toso > --- > common/lz.

Re: [Spice-devel] [spice-common 5/8] coverity: avoid division or modulo by zero

2016-04-04 Thread Victor Toso
Hi, On Mon, Apr 04, 2016 at 10:03:36AM +0200, Fabiano Fidêncio wrote: > --- > common/lines.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common/lines.c b/common/lines.c > index 10ca318..e5097c4 100644 > --- a/common/lines.c > +++ b/common/lines.c > @@ -412,7 +412,7 @

Re: [Spice-devel] [spice-common 1/8] coverity: avoid use after free

2016-04-04 Thread Victor Toso
Hi, On Mon, Apr 04, 2016 at 10:03:32AM +0200, Fabiano Fidêncio wrote: > --- > common/canvas_utils.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/common/canvas_utils.c b/common/canvas_utils.c > index c5813f4..0be761a 100644 > --- a/common/canvas_utils.c > +++ b/common/canvas_utils.c >

Re: [Spice-devel] [spice-gtk PATCH] Usbredir: enable lz4 compression

2016-04-04 Thread Victor Toso
Hi, On Sun, Apr 03, 2016 at 06:40:09PM +0300, Snir Sheriber wrote: > Compressed message type is CompressedData which contains compression > type (1 byte) followed by the uncompressed data size (4 bytes) followed > by the compressed data size (4 bytes) followed by the compressed data > > If SPICE_

Re: [Spice-devel] [spice-common 3/8] coverity: avoid out of bounds access

2016-04-04 Thread Christophe Fergeau
On Mon, Apr 04, 2016 at 10:03:34AM +0200, Fabiano Fidêncio wrote: > We are allocating insufficient memory for the terminating null of the > string. > --- > common/ssl_verify.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/common/ssl_verify.c b/common/ssl_verify.c >

Re: [Spice-devel] [spice-gtk 4/4] coverity: identical code for different branches

2016-04-04 Thread Fabiano Fidêncio
On Mon, Apr 4, 2016 at 10:27 AM, Victor Toso wrote: > Hey, > > From coverity there are only 2 spice-gtk patches, right? There are 4, actually. I hope I ended up submitting all of them. > Both look good to me > Acked-by: Victor Toso > > On Mon, Apr 04, 2016 at 10:02:09AM +0200, Fabiano Fidêncio

Re: [Spice-devel] [spice-gtk 4/4] coverity: identical code for different branches

2016-04-04 Thread Victor Toso
Hey, From coverity there are only 2 spice-gtk patches, right? Both look good to me Acked-by: Victor Toso On Mon, Apr 04, 2016 at 10:02:09AM +0200, Fabiano Fidêncio wrote: > --- > src/spice-client-glib-usb-acl-helper.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/sr

Re: [Spice-devel] [spice-common 8/8] Use g_getenv() instead of getenv()

2016-04-04 Thread Christophe Fergeau
On Mon, Apr 04, 2016 at 10:03:39AM +0200, Fabiano Fidêncio wrote: > --- > common/log.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/common/log.c b/common/log.c > index 8d47cb6..91d3181 100644 > --- a/common/log.c > +++ b/common/log.c > @@ -59,7 +59,7 @@ static GLog

Re: [Spice-devel] [spice-common 2/8] coverity: avoid resource leak

2016-04-04 Thread Christophe Fergeau
On Mon, Apr 04, 2016 at 10:03:33AM +0200, Fabiano Fidêncio wrote: > --- > common/canvas_base.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/common/canvas_base.c b/common/canvas_base.c > index fa4d373..650422b 100644 > --- a/common/canvas_base.c > +++ b/common/canvas_base.c > @@ -769,6

[Spice-devel] [spice-common 6/8] coverity: remove unused value

2016-04-04 Thread Fabiano Fidêncio
len is overwritten in the match label with the value from "ip - anchor". --- common/lz_compress_tmpl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/lz_compress_tmpl.c b/common/lz_compress_tmpl.c index 3162a96..e316c4b 100644 --- a/common/lz_compress_tmpl.c +++ b/co

[Spice-devel] [spice-common 1/8] coverity: avoid use after free

2016-04-04 Thread Fabiano Fidêncio
--- common/canvas_utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/canvas_utils.c b/common/canvas_utils.c index c5813f4..0be761a 100644 --- a/common/canvas_utils.c +++ b/common/canvas_utils.c @@ -109,6 +109,7 @@ static inline pixman_image_t *__surface_create_stride(pixman_format

[Spice-devel] [spice-common 7/8] coverity: remove structurally dead code

2016-04-04 Thread Fabiano Fidêncio
The loop (for (;;)) will be executed only once, so, no reason for keeping it. --- common/lz_compress_tmpl.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/common/lz_compress_tmpl.c b/common/lz_compress_tmpl.c index e316c4b..0305278 100644 --- a/common/lz_c

[Spice-devel] [spice-common 2/8] coverity: avoid resource leak

2016-04-04 Thread Fabiano Fidêncio
--- common/canvas_base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/canvas_base.c b/common/canvas_base.c index fa4d373..650422b 100644 --- a/common/canvas_base.c +++ b/common/canvas_base.c @@ -769,6 +769,7 @@ static inline SpicePalette *canvas_get_localized_palette(CanvasBase *can

[Spice-devel] [spice-common 4/8] coverity: avoid dereference after null check

2016-04-04 Thread Fabiano Fidêncio
All decompress functions used after this check take into account that encoder->palette is not NULL. So, if we already detected that the palette is NULL, let's just return early. --- common/lz.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/lz.c b/common/lz.c index d1c4033..2589223 100

[Spice-devel] [spice-common 5/8] coverity: avoid division or modulo by zero

2016-04-04 Thread Fabiano Fidêncio
--- common/lines.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lines.c b/common/lines.c index 10ca318..e5097c4 100644 --- a/common/lines.c +++ b/common/lines.c @@ -412,7 +412,7 @@ miStepDash (int dist, /* distance to step */ totallen = 0; for (i =

[Spice-devel] [spice-common 3/8] coverity: avoid out of bounds access

2016-04-04 Thread Fabiano Fidêncio
We are allocating insufficient memory for the terminating null of the string. --- common/ssl_verify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/ssl_verify.c b/common/ssl_verify.c index 601252e..4292ddf 100644 --- a/common/ssl_verify.c +++ b/common/ssl_verify.c

[Spice-devel] [spice-common 8/8] Use g_getenv() instead of getenv()

2016-04-04 Thread Fabiano Fidêncio
--- common/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/log.c b/common/log.c index 8d47cb6..91d3181 100644 --- a/common/log.c +++ b/common/log.c @@ -59,7 +59,7 @@ static GLogLevelFlags spice_log_level_to_glib(SpiceLogLevel level) static void spice_log_set_

[Spice-devel] [spice-gtk 4/4] coverity: identical code for different branches

2016-04-04 Thread Fabiano Fidêncio
--- src/spice-client-glib-usb-acl-helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/spice-client-glib-usb-acl-helper.c b/src/spice-client-glib-usb-acl-helper.c index c2baeda..03a0317 100644 --- a/src/spice-client-glib-usb-acl-helper.c +++ b/src/spice-client-glib-u

[Spice-devel] [spice-gtk 3/4] coverity: avoid out of bounds access

2016-04-04 Thread Fabiano Fidêncio
--- src/controller/test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/test.c b/src/controller/test.c index 649aca5..2909b06 100644 --- a/src/controller/test.c +++ b/src/controller/test.c @@ -262,7 +262,7 @@ int main (int argc, char *argv[]) send_data (CO

Re: [Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard.

2016-04-04 Thread Fabiano Fidêncio
Ouch, sorry for resending this patch :-\ My intention was to submit another series completely not related to this one, my bad :-\ On Mon, Apr 4, 2016 at 9:59 AM, Fabiano Fidêncio wrote: > From: Takao Fujiwara > > MapVirtualKey() returns the scancode of the released Zenkaku_Hankaku key > but does

Re: [Spice-devel] [spice-gtk 0/3] Handle JP keyboard with spice-gtk from Windows client

2016-04-04 Thread Fabiano Fidêncio
Ouch, sorry for resending this patch :-\ My intention was to submit another series completely not related to this one, my bad :-\ On Mon, Apr 4, 2016 at 9:59 AM, Fabiano Fidêncio wrote: > In order to speed up the process I took the freedom to apply Takao's > patches locally, regenerate the patche

[Spice-devel] [spice-gtk 0/3] Handle JP keyboard with spice-gtk from Windows client

2016-04-04 Thread Fabiano Fidêncio
In order to speed up the process I took the freedom to apply Takao's patches locally, regenerate the patches (and cover letter) and submit them upstream using git send-email. Please, for more info, take a look on: https://lists.freedesktop.org/archives/spice-devel/2016-March/027878.html Takao Fuj

[Spice-devel] [spice-gtk 2/4] coverity: avoid string overflow

2016-04-04 Thread Fabiano Fidêncio
sockaddr_un.sun_path has 108 bytes, while pipe_name has PIPE_NAME_MAX_LEN (256 bytes) --- src/controller/test.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/controller/test.c b/src/controller/test.c index 9a45581..649aca5 100644 --- a/src/controller/test.c +++ b/src/controller/tes

[Spice-devel] [spice-gtk 1/4] coverity: fix unitialized use of mem.data

2016-04-04 Thread Fabiano Fidêncio
--- src/channel-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/channel-main.c b/src/channel-main.c index 4a1f58a..93537d2 100644 --- a/src/channel-main.c +++ b/src/channel-main.c @@ -1021,9 +1021,9 @@ static void agent_msg_queue_many(SpiceMainChannel *channel, int

[Spice-devel] [spice-gtk 1/3] Send Zenkaku_Hankaku key in JP keyboard.

2016-04-04 Thread Fabiano Fidêncio
From: Takao Fujiwara MapVirtualKey() returns the scancode of the released Zenkaku_Hankaku key but does not pressed one and modifiered one. Any cases should be sent to use input method engines. --- src/spice-widget-priv.h | 1 + src/spice-widget.c | 37 +++--

Re: [Spice-devel] "undefined reference" errors while running make

2016-04-04 Thread Christophe Fergeau
On Sat, Apr 02, 2016 at 02:14:11PM +, Mahmood Naderan wrote: > Hi Eduardo,I have to say that the latest git revision doesn't include your > patch.  So, I applied your patch manually into the latest revision. > That undefined error has been solved, but now I see a new error.Please note > that