[Spice-devel] [[spice] 1/9] server: Don't dump the bitmap when the format is invalid

Fabiano Fidêncio fidencio at redhat.com
Mon Sep 1 06:45:34 PDT 2014


Caught by covscan:
spice/server/spice_bitmap_utils.c:54: var_decl: Declaring variable "n_pixel_bits" without initializer.
spice/server/spice_bitmap_utils.c:106: uninit_use: Using uninitialized value "n_pixel_bits".
---
 server/spice_bitmap_utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/spice_bitmap_utils.c b/server/spice_bitmap_utils.c
index 7b370a0..aa7d71b 100644
--- a/server/spice_bitmap_utils.c
+++ b/server/spice_bitmap_utils.c
@@ -95,6 +95,7 @@ void dump_bitmap(SpiceBitmap *bitmap)
         break;
     default:
         spice_error("invalid bitmap format  %u", bitmap->format);
+        return;
     }
 
     if (!rgb) {
-- 
1.9.3



More information about the Spice-devel mailing list