Re: [xf86-video-qxl v6] Enable smartcard support for XSpice.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]