[Spice-devel] Question on fill_mask() (server/red_worker.c)

Yonit Halperin yhalperi at redhat.com
Tue Oct 4 04:25:24 PDT 2011


On 10/04/2011 01:20 PM, Alon Levy wrote:
> On Tue, Oct 04, 2011 at 01:00:47PM +0200, Alon Levy wrote:
>> On Tue, Oct 04, 2011 at 12:40:21PM +0200, Yaniv Kaul wrote:
>>> Unless I'm misreading the code (which may very well be), the
>>> function looks like:
>>>
>>> if (mask_bitmap&&  m) {
>>>      if (this or that) {
>>>          do X
>>>          fill_bits(...)
>>>      } else {
>>>          fill_bits(...)
>>>      }
>>> }
>>>
>>> So essentially, if the condition (mask_bitmap&&  m) is NOT met, we
>>> do not fill the bits. Which means we are sending garbage over the
>>> wire?
>>
>> I read it the same. Can you add the else and see if it gets there? (or
>> figure that out by just reading the code)
>>
>
> Actually, m should be always non NULL (since it is set unconditionally
> by spice_marshall_Fill for instance - didn't check the others though) and I
> think a marshaller that doesn't get filled will just produce 0 bytes of output.
>
There is no problem with the mask being null. As I recall, we just don't 
send a mask.
>>> Y.
>>>
>>> _______________________________________________
>>> Spice-devel mailing list
>>> Spice-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list