Re: [Xen-devel] [PATCH v3 10/25] usb-redir: Verify usbredirparser_write get called with positive count

2019-02-19 Thread Gerd Hoffmann
On Wed, Feb 20, 2019 at 02:02:17AM +0100, Philippe Mathieu-Daudé wrote: > The usbredirparser_write handler should never be called with a negative > size payload, return an error if this is not the case. > Now that we are sure the 'count' value is positive, make it obvious by > casting it to a

[Xen-devel] [PATCH v3 10/25] usb-redir: Verify usbredirparser_write get called with positive count

2019-02-19 Thread Philippe Mathieu-Daudé
The usbredirparser_write handler should never be called with a negative size payload, return an error if this is not the case. Now that we are sure the 'count' value is positive, make it obvious by casting it to a size_t. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/redirect.c | 6 +- 1