|
@@ -1121,7 +1121,11 @@ static int vidioc_enum_frameintervals(struct file *file, void *priv,
|
|
if (!fmt)
|
|
if (!fmt)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
- /* regarding width & height - we support any */
|
|
|
|
|
|
+ /* check for valid width/height */
|
|
|
|
+ if (fival->width < 48 || fival->width > MAX_WIDTH || (fival->width & 3))
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ if (fival->height < 32 || fival->height > MAX_HEIGHT)
|
|
|
|
+ return -EINVAL;
|
|
|
|
|
|
fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS;
|
|
fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS;
|
|
|
|
|