[Spice-devel] [spice-common][PATCH 2/2] quic_family_tmpl: Fix "FORWARD_NULL" caught by coverity

Fabiano Fidêncio fidencio at redhat.com
Tue Jul 15 01:12:23 PDT 2014


Ensure the received bucket is non NULL
---
 common/quic_family_tmpl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/quic_family_tmpl.c b/common/quic_family_tmpl.c
index 12ef62f..9a434e0 100644
--- a/common/quic_family_tmpl.c
+++ b/common/quic_family_tmpl.c
@@ -72,6 +72,8 @@ static void FNAME(update_model)(CommonState *state, s_bucket * const bucket,
                                 const BYTE curval)
 {
     spice_static_assert(BPC >= 1);
+    spice_return_if_fail (bucket != NULL);
+
     const unsigned int bpp = BPC;
     COUNTER * const pcounters = bucket->pcounters;
     unsigned int i;
-- 
1.9.3



More information about the Spice-devel mailing list