Bug 39692

Summary: Not an actual issue but seems like a bad idea to have this cruft in the code :)
Product: Spice Reporter: dave b <db.pub.mail>
Component: serverAssignee: Spice Bug List <spice-bugs>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description dave b 2011-07-30 08:42:49 UTC
It looks like there is some debug code scattered around which is currently disabled. 

#1 in the function 
dump_bitmap in http://cgit.freedesktop.org/spice/spice/tree/server/red_worker.c
appears to write (/create) in /tmp without proper checks first  

    id = ++file_id;
    sprintf(file_str, "%s/%u.bmp", RAM_PATH, id);

    f = fopen(file_str, "wb");
    if (!f) {
        red_error("Error creating bmp\n");
        return;
    }

However, because DUMP_BITMAP  will not be defined - this isn't an issue :)

#2 Likewise because DUMP_JPEG & DEBUG_DUMP_BITMAP isn't defined in 
http://cgit.freedesktop.org/spice/spice/tree/common/canvas_base.c
"However, because  DUMP_JPEG/DEBUG_DUMP_BITMAP will not be defined - this isn't an issue :)"
Comment 1 Marc-Andre Lureau 2014-11-03 01:52:34 UTC
some compiled-out debug code is fine

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.