Re: [PATCH 1/1] v4l: compat: Prevent allocating excessive amounts of memory

2016-11-03 Thread Hans Verkuil
On 05/10/16 14:21, Sakari Ailus wrote: get_v4l2_ext_controls32() is used to convert the 32-bit compat struct into native 64-bit representation. The function multiplies the array length by the entry length before validating size. Perform the size validation first. Also use unsigned values for

[PATCH 1/1] v4l: compat: Prevent allocating excessive amounts of memory

2016-10-05 Thread Sakari Ailus
get_v4l2_ext_controls32() is used to convert the 32-bit compat struct into native 64-bit representation. The function multiplies the array length by the entry length before validating size. Perform the size validation first. Also use unsigned values for size computation. Make similar changes to