Bug 39692 - Not an actual issue but seems like a bad idea to have this cruft in the code :)
Summary: Not an actual issue but seems like a bad idea to have this cruft in the code :)
Status: RESOLVED WORKSFORME
Alias: None
Product: Spice
Classification: Unclassified
Component: server (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-30 08:42 UTC by dave b
Modified: 2014-11-03 01:52 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.