[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers |
Date: |
Thu, 23 Mar 2017 08:14:49 +0000 |
Hi
On Thu, Mar 23, 2017 at 11:44 AM Gerd Hoffmann <address@hidden> wrote:
> Hi,
>
> > > + if (len == 0) {
> > > + return;
> >
> > Correct only if messages without data always have the same meaning as no
> > message. Gerd?
>
> Not a ccid expert, but looking through the code it seems writing a
> (reply) data block with status and without payload (data = NULL and len
> = 0) is perfectly fine and can happen in case no (virtual) smartcard is
> inserted into the card reader. Which this patch breaks. So,
>
> NACK.
>
oops, there are hard-coded calls with NULL/0. I suppose to fix clang
warning, it would need to check if data != null for memcpy.
--
Marc-André Lureau
- [Qemu-devel] [PATCH RESEND 0/3] easy-to-fix clang warnings, Philippe Mathieu-Daudé, 2017/03/22
- [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Philippe Mathieu-Daudé, 2017/03/22
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Markus Armbruster, 2017/03/23
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Gerd Hoffmann, 2017/03/23
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers,
Marc-André Lureau <=
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Gerd Hoffmann, 2017/03/23
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Markus Armbruster, 2017/03/23
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Gerd Hoffmann, 2017/03/23
- Re: [Qemu-devel] [PATCH RESEND 1/3] usb-ccid: make ccid_write_data_block() cope with null buffers, Markus Armbruster, 2017/03/23
[Qemu-devel] [PATCH RESEND 2/3] device_tree: fix compiler warnings (clang 5), Philippe Mathieu-Daudé, 2017/03/22
[Qemu-devel] [PATCH RESEND 3/3] qga: fix compiler warnings (clang 5), Philippe Mathieu-Daudé, 2017/03/22