Skip to content

Commit

Permalink
media: ivtv: don't allow negative resolutions as module parameters
Browse files Browse the repository at this point in the history
This driver takes "osd_xres" and "osd_yres" as module parameters and
caps the upper bounds but it doesn't cap the lower bounds.  Obviously
the admin is not going to enter negative resolutions but the possibility
makes static analysis more difficult.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
Dan Carpenter authored and mchehab committed Sep 30, 2021
1 parent 538314d commit 4ba8d70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/media/pci/ivtv/ivtvfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ static bool osd_laced;
static int osd_depth;
static int osd_upper;
static int osd_left;
static int osd_yres;
static int osd_xres;
static unsigned int osd_yres;
static unsigned int osd_xres;

module_param(ivtvfb_card_id, int, 0444);
module_param_named(debug,ivtvfb_debug, int, 0644);
Expand All @@ -58,8 +58,8 @@ module_param(osd_laced, bool, 0444);
module_param(osd_depth, int, 0444);
module_param(osd_upper, int, 0444);
module_param(osd_left, int, 0444);
module_param(osd_yres, int, 0444);
module_param(osd_xres, int, 0444);
module_param(osd_yres, uint, 0444);
module_param(osd_xres, uint, 0444);

MODULE_PARM_DESC(ivtvfb_card_id,
"Only use framebuffer of the specified ivtv card (0-31)\n"
Expand Down

0 comments on commit 4ba8d70

Please sign in to comment.