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

Jeremy White jwhite at codeweavers.com
Thu Jan 8 06:10:23 PST 2015


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.

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


More information about the Spice-devel mailing list