Hey,

On Mon, Jan 06, 2014 at 03:35:24PM +0200, Uri Lublin wrote:
> 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 adds an assert so that we
> >catch this condition if it ever happens.
> >---
> >  common/quic.c | 12 +++++++-----
> >  1 file changed, 7 insertions(+), 5 deletions(-)
> >
> >diff --git a/common/quic.c b/common/quic.c
> >index 2cffde5..cef05ae 100644
> >--- a/common/quic.c
> >+++ b/common/quic.c
> >@@ -954,11 +954,13 @@ static void find_model_params(Encoder *encoder,
> >      bsize = *firstsize;
> >      do { /* other buckets */
> 
> Hi Christophe,
> 
> Maybe the condition was supposed to be
>    if (*nbuckets)

That indeed makes a lot of sense. However, I'm uncomfortable changing code
I don't understand, even quic still seems to be working after changning
this. So not sure which way to go here :-/

Christophe

Attachment: pgpG6OMX_az5u.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to