Re: [PATCH v2] media: uvcvideo: Fix 'type' check leading to overflow

2018-12-19 Thread Alistair Strachan
On Wed, Dec 19, 2018 at 12:16 AM Laurent Pinchart wrote: > > Hi Alistair, > > Thank you for the patch. > > On Wednesday, 19 December 2018 03:32:48 EET Alistair Strachan wrote: > > From: Laurent Pinchart > > Are you sure you don't want to keep authorship ? I've merely reviewed v1 and > proposed an

Re: [PATCH v2] media: uvcvideo: Fix 'type' check leading to overflow

2018-12-19 Thread Laurent Pinchart
Hi Alistair, Thank you for the patch. On Wednesday, 19 December 2018 03:32:48 EET Alistair Strachan wrote: > From: Laurent Pinchart Are you sure you don't want to keep authorship ? I've merely reviewed v1 and proposed an alternative implementation :-) Let me know what you would prefer and I'l

[PATCH v2] media: uvcvideo: Fix 'type' check leading to overflow

2018-12-18 Thread Alistair Strachan
From: Laurent Pinchart When initially testing the Camera Terminal Descriptor wTerminalType field (buffer[4]), no mask is used. Later in the function, the MSB is overloaded to store the descriptor subtype, and so a mask of 0x7fff is used to check the type. If a descriptor is specially crafted to