Re: [Spice-devel] [PATCH 3/3] Add VD_AGENT_CAP_MAX_CLIPBOARD support

2014-01-06 Thread Marc-André Lureau
ping On Thu, Nov 14, 2013 at 5:03 PM, Marc-André Lureau wrote: > From: Marc-André Lureau > > Do not send clipboard data bigger than last received > VDAgentMaxClipboard. > > There is no need to further limit at the session agent, since it is > already OOM safe, and since marhsalling/sending is lo

Re: [Spice-devel] [PATCH 0/2] coverity fixes

2014-01-06 Thread Uri Lublin
On 01/06/2014 01:26 PM, Christophe Fergeau wrote: Hey, 2 more patches for stuff reported by coverity, but most of it was happening in spice-common and is addressed by a separate patch series Ack both. ___ Spice-devel mailing list Spice-devel@lists.fr

Re: [Spice-devel] [spice-common 7/8] quic: Remove test which is always TRUE

2014-01-06 Thread Uri Lublin
On 01/06/2014 01:22 PM, Christophe Fergeau wrote: find_model_params() is first dereferencing nbuckets when setting it to 0, and then it checks it for NULL. The NULL-check will never trigger as if the pointer was NULL, we'd crash when we dereference it. This commit removes the redundant test, but

Re: [Spice-devel] release-cursor in spiceproxy file

2014-01-06 Thread Lindsay Mathieson
On Mon, 6 Jan 2014 06:08:54 AM Marian Krcmarik wrote: > > However if I try "release-cursor=Ctrl+Alt" I just get "(Press to > > release)" > > and the combo does not work. > > http://lists.freedesktop.org/archives/spice-devel/2013-November/015596.html Thanks Marian, good to know. Though how did i

Re: [Spice-devel] [spice-common 1/8] Remove unused variable

2014-01-06 Thread Marc-André Lureau
ack series - Original Message - > It was assigned a value, but then the value was never used. > --- > common/lz_compress_tmpl.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/common/lz_compress_tmpl.c b/common/lz_compress_tmpl.c > index 2b66833..b5d0049 100644 > --- a/common/l

Re: [Spice-devel] [spice-gtk 4/5] controller: Don't call g_type_init() in test with newer glib

2014-01-06 Thread Marc-André Lureau
ack - Original Message - > g_type_init() is deprecated, calling it on newer glib causes a compile-time > warning. > --- > gtk/controller/test.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/gtk/controller/test.c b/gtk/controller/test.c > index c7ae8f0..851f237 100644 > --- a

Re: [Spice-devel] [spice-gtk 0/5] Misc coverity fixes

2014-01-06 Thread Marc-André Lureau
ack series - Original Message - > Hey, > > Here are some spice-gtk patches fixing some issues reported by coverity. > > Christophe > > ___ > Spice-devel mailing list > Spice-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/li

[Spice-devel] [PATCH 2/2] tests: Avoid malloc failures

2014-01-06 Thread Christophe Fergeau
test-display-streaming is calling malloc() without checking its return value. Coverity warns about this. This commit switches to g_malloc() to sidestep this warning (g_malloc() never returns NULL but aborts instead). --- server/tests/Makefile.am | 2 ++ server/tests/test_display_strea

[Spice-devel] [PATCH 0/2] coverity fixes

2014-01-06 Thread Christophe Fergeau
Hey, 2 more patches for stuff reported by coverity, but most of it was happening in spice-common and is addressed by a separate patch series Christophe ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/

[Spice-devel] [PATCH 1/2] tests: Remove unused variables

2014-01-06 Thread Christophe Fergeau
coverity spotted some variables that were declared but not used in server/tests --- server/tests/test_display_base.c | 1 - server/tests/test_playback.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c index ccdd2f2..0379

[Spice-devel] [spice-gtk 2/5] controller: Avoid out of string bound accesses in test

2014-01-06 Thread Christophe Fergeau
When computing the amount of data to send for static strings, the test program is confusing sizeof() which returns the size of the string including the trailing '\0' and strlen() which returns the size of the string without the trailing '\0'. This causes attempts to access one byte past the string.

[Spice-devel] [spice-gtk 3/5] controller: Add missing #ifdef WIN32 in test

2014-01-06 Thread Christophe Fergeau
The spicec_pid variable is only used in a #ifdef WIN32 block, but it was unconditionnally declared/initialized. This causes a gcc warning. --- gtk/controller/test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/controller/test.c b/gtk/controller/test.c index dffc7af..c7ae8f0 100644 ---

[Spice-devel] [spice-gtk 4/5] controller: Don't call g_type_init() in test with newer glib

2014-01-06 Thread Christophe Fergeau
g_type_init() is deprecated, calling it on newer glib causes a compile-time warning. --- gtk/controller/test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/controller/test.c b/gtk/controller/test.c index c7ae8f0..851f237 100644 --- a/gtk/controller/test.c +++ b/gtk/controller/test.c @

[Spice-devel] [spice-gtk 0/5] Misc coverity fixes

2014-01-06 Thread Christophe Fergeau
Hey, Here are some spice-gtk patches fixing some issues reported by coverity. Christophe ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [spice-gtk 1/5] cursor: Avoid potential sign extension issue

2014-01-06 Thread Christophe Fergeau
When doing arithmetic operations on the uint16_t cursor width and height with integer constants, the result of the operation will be of type 'int' as the integer constant as type 'int'. There are 2 places which assign the result of such an operation to an (unsigned 64 bit)) size_t variable. This me

[Spice-devel] [spice-gtk 5/5] Use local GError in spice_convert_newlines()

2014-01-06 Thread Christophe Fergeau
spice_convert_newlines() declares a local 'err' GError but never uses it as the function directly uses the 'error' variable passed as an argument. Use 'err' throughout the function instead of the 'error' argument as this looks like what was intended. This fixes this coverity warning: Error: DEADCO

[Spice-devel] [spice-common 5/8] mi: fix memory leak in miFillUniqueSpanGroup

2014-01-06 Thread Christophe Fergeau
This is based off the corresponding xserver commit from Tiago Vignatti: http://cgit.freedesktop.org/xorg/xserver/commit/mi/mispans.c?id=7ae46b69ba3f05f46529131e6a864904967cde3a Since xrealloc is #defined to spice_realloc which aborts on failure, this block is dead code, but I prefer to stay as clo

[Spice-devel] [spice-common 4/8] mi: Avoid stack smash when drawing dashed lines

2014-01-06 Thread Christophe Fergeau
Based off Peter Harris's xserver commit http://cgit.freedesktop.org/xorg/xserver/commit/mi/miwideline.c?id=20c2a3bcb11b5baf564e2c73a477ba23f5ae2b10 --- common/lines.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/lines.c b/common/lines.c index 8b15e79..adf1479 10

[Spice-devel] [spice-common 6/8] mi: Fix shadow warnings

2014-01-06 Thread Christophe Fergeau
Based off a xserver commit from Yaakov Selkowitz: http://cgit.freedesktop.org/xorg/xserver/commit/mi/mispans.c?id=f02e27e4fcc34413b2051e5a01edc92172fa8612 --- common/lines.c | 4 1 file changed, 4 deletions(-) diff --git a/common/lines.c b/common/lines.c index 5b26662..4f404f1 100644 --- a/c

[Spice-devel] [spice-common 7/8] quic: Remove test which is always TRUE

2014-01-06 Thread Christophe Fergeau
find_model_params() is first dereferencing nbuckets when setting it to 0, and then it checks it for NULL. The NULL-check will never trigger as if the pointer was NULL, we'd crash when we dereference it. This commit removes the redundant test, but adds an assert so that we catch this condition if it

[Spice-devel] [spice-common 8/8] ssl: Don't use uninitialized variable in verify_subject()

2014-01-06 Thread Christophe Fergeau
If verify_subject() is called with a SpiceOpenSSLVerify struct containing a non-NULL 'in_subject' member, it would try to use the local 'in_entries' variable without having initialized it first. This could happen if verify_subject() was called multiple time with the same SpiceOpenSSLVerify context,

[Spice-devel] [spice-common 2/8] backtrace: Don't attempt to call seteuid(0)

2014-01-06 Thread Christophe Fergeau
We are mostly likely not running as root, so this call will fail. As we are supposed to check its return value as it's declared with warn_unused_result, the current way of using it is wrong, so this commit just removes the call. --- common/backtrace.c | 1 - 1 file changed, 1 deletion(-) diff --g

[Spice-devel] [spice-common 0/8] Misc coverity fixes

2014-01-06 Thread Christophe Fergeau
Hey, I've recently looked at a coverity run over spice/spice-gtk, and it reported a few (probably minor) issues which are fixed by these patches. There are still some unfixed issues reported by coverity, some of them are in the generated (de)marshallers for the tunneling messages, which are hopefu

[Spice-devel] [spice-common 3/8] quic: Add missing break; in switch/case

2014-01-06 Thread Christophe Fergeau
Unhandled values call an error callback, and then fall through the default: case, which will call again the error callback. This commit adds some break; after these cases to avoid this. --- common/quic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/quic.c b/common/quic.c index bcbf

[Spice-devel] [spice-common 1/8] Remove unused variable

2014-01-06 Thread Christophe Fergeau
It was assigned a value, but then the value was never used. --- common/lz_compress_tmpl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/lz_compress_tmpl.c b/common/lz_compress_tmpl.c index 2b66833..b5d0049 100644 --- a/common/lz_compress_tmpl.c +++ b/common/lz_compress_tmpl.c @@ -479

Re: [Spice-devel] [patch] Add missing format string in SpiceController::~SpiceController()

2014-01-06 Thread Christophe Fergeau
Hi, On Thu, Jan 02, 2014 at 11:56:10PM +0100, Petter Reinholdtsen wrote: > [Christophe Fergeau] > > With that said, the patch is small enough that I'm fine with taking > > it. > > Great! I've just pushed http://cgit.freedesktop.org/spice/spice-xpi/commit/?id=3ede7323a5f84cb3e02883b1282b9358a760d

Re: [Spice-devel] release-cursor in spiceproxy file

2014-01-06 Thread Marian Krcmarik
- Original Message - > From: "Lindsay Mathieson" > To: u...@redhat.com, spice-devel@lists.freedesktop.org > Sent: Monday, January 6, 2014 11:51:09 AM > Subject: Re: [Spice-devel] release-cursor in spiceproxy file > > On Mon, 6 Jan 2014 11:35:28 AM Uri Lublin wrote: > > Hi Lindsay, > >

Re: [Spice-devel] release-cursor in spiceproxy file

2014-01-06 Thread Lindsay Mathieson
On Mon, 6 Jan 2014 11:35:28 AM Uri Lublin wrote: > Hi Lindsay, > > Please try with a different combination, such as ctrl+alt+r, or shift+f12. Both those work - they show in the window title and work for releasing the cursor. However if I try "release-cursor=Ctrl+Alt" I just get "(Press to rele

Re: [Spice-devel] release-cursor in spiceproxy file

2014-01-06 Thread Uri Lublin
On 01/06/2014 04:45 AM, Lindsay Mathieson wrote: Is the master remote-viewer respecting this setting? because it doesn't appear to be working for me. I have latest remote-viewer built from git and "release-cursor=ctrl+alt" set in my spiceproxy file, but just get "Press for release" in the window