[Bug 39692] New: Not an actual issue but seems like a bad idea to have this cruft in the code :)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jul 30 08:42:49 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=39692

           Summary: Not an actual issue but seems like a bad idea to have
                    this cruft in the code :)
           Product: Spice
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: server
        AssignedTo: spice-bugs at lists.freedesktop.org
        ReportedBy: db.pub.mail at gmail.com


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 :)"

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the spice-bugs mailing list