[Spice-devel] [xf86-video-qxl v6] Enable smartcard support for XSpice.

Alon Levy alon at pobox.com
Thu Jan 8 06:15:11 PST 2015


On 01/08/2015 04:10 PM, Jeremy White wrote:
> On 01/08/2015 03:53 AM, Uri Lublin wrote:
>> Hi Jeremy,
>>
>> Ack.
> 
> Thanks.
> 
>>
>> h->length is unsigned.
>> 1. Why is there a need to check that h->length > 0 ?
> 
> There is no need, changed.
> 
>> 2. What happens if h->length == 0 ?
> 
> Note that I believe that could only occur in the case of a malicious or
> buggy packet.  By inspection, I believe the code will all function
> correctly; passing a 0 length atr along.

Is this to the card (hardware) or back? if to, can't this be used by a
driver to wakeup a card (i.e. dropping it will have adverse affects)?

> 
>>> +static void process_apdu(smartcard_ccid_t *ccid, VSCMsgHeader *h,
>>> char *data)
>>> +{
>>> +    if (ccid->state & STATE_READER_ADDED)
>>> +        push_apdu(ccid, data, h->length);
>>
>> Maybe add: else { fprintf(stderr, "warning ..." }
> 
> Sure.
> 
> Cheers,
> 
> Jeremy
> _______________________________________________
> 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