[Bug 41713] New: Mask is sent as garbage when not used

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 12 03:23:25 PDT 2011


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

           Summary: Mask is sent as garbage when not used
           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: ykaul at redhat.com


If mask is not used, instead of sending the type as 'none' or something (1
byte), we send garbage (memory is not even zero'ed), and the whole Mask
structure (13 bytes). Waste.

The code (with my printf) from server/red_worker.c:

static void fill_mask(RedChannelClient *rcc, SpiceMarshaller *m,
                      SpiceImage *mask_bitmap, Drawable *drawable)
{
    DisplayChannel *display_channel = SPICE_CONTAINEROF(rcc->channel,
DisplayChannel, common.base);
    DisplayChannelClient *dcc = RCC_TO_DCC(rcc);

    if (mask_bitmap && m) {
        if (display_channel->common.worker->image_compression !=
SPICE_IMAGE_COMPRESS_OFF) {
            spice_image_compression_t save_img_comp =
                display_channel->common.worker->image_compression;
            display_channel->common.worker->image_compression =
SPICE_IMAGE_COMPRESS_OFF;
            fill_bits(dcc, m, mask_bitmap, drawable, FALSE);
            display_channel->common.worker->image_compression = save_img_comp;
        } else {
            fill_bits(dcc, m, mask_bitmap, drawable, FALSE);
        }
    } else {
        red_printf("fill_mask not doing much");
    }
}

-- 
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