Skip to content

Commit

Permalink
Off-by-one condition when retrieving defaults
Browse files Browse the repository at this point in the history
Signed-off-by: Benny Baumann <[email protected]>
  • Loading branch information
BenBE authored and umlaeute committed Jun 19, 2022
1 parent fb4ebca commit d5757d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v4l2loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -2366,9 +2366,9 @@ static int v4l2_loopback_add(struct v4l2_loopback_config *conf, int *ret_nr)
int err = -ENOMEM;

int _max_width = DEFAULT_FROM_CONF(
max_width, <= V4L2LOOPBACK_SIZE_MIN_WIDTH, max_width);
max_width, < V4L2LOOPBACK_SIZE_MIN_WIDTH, max_width);
int _max_height = DEFAULT_FROM_CONF(
max_height, <= V4L2LOOPBACK_SIZE_MIN_HEIGHT, max_height);
max_height, < V4L2LOOPBACK_SIZE_MIN_HEIGHT, max_height);
bool _announce_all_caps = (conf && conf->announce_all_caps >= 0) ?
(conf->announce_all_caps) :
V4L2LOOPBACK_DEFAULT_EXCLUSIVECAPS;
Expand Down

0 comments on commit d5757d7

Please sign in to comment.