Skip to content

Commit

Permalink
add explicit format specifier to printf() invocations
Browse files Browse the repository at this point in the history
CWE-134
  • Loading branch information
umlaeute committed Aug 3, 2022
1 parent 432e9a4 commit e4cd225
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v4l2loopback.c
Expand Up @@ -756,7 +756,7 @@ static int vidioc_querycap(struct file *file, void *priv,
__u32 capabilities = V4L2_CAP_STREAMING | V4L2_CAP_READWRITE;

strlcpy(cap->driver, "v4l2 loopback", sizeof(cap->driver));
snprintf(cap->card, labellen, dev->card_label);
snprintf(cap->card, labellen, "%s", dev->card_label);
snprintf(cap->bus_info, sizeof(cap->bus_info),
"platform:v4l2loopback-%03d", device_nr);

Expand Down Expand Up @@ -2494,7 +2494,7 @@ static int v4l2_loopback_add(struct v4l2_loopback_config *conf, int *ret_nr)
}

MARK();
snprintf(dev->vdev->name, sizeof(dev->vdev->name), dev->card_label);
snprintf(dev->vdev->name, sizeof(dev->vdev->name), "%s", dev->card_label);

vdev_priv->device_nr = nr;

Expand Down

0 comments on commit e4cd225

Please sign in to comment.