Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f38f3339 authored by Chris Rankin's avatar Chris Rankin Committed by Mauro Carvalho Chehab
Browse files

[media] em28xx: pass correct buffer size to snprintf



snprintf()'s size parameter includes space for the terminating '\0' character.

Signed-off-by: default avatarChris Rankin <rankincj@yahoo.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c0f856d3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3154,7 +3154,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
		goto err;
	}

	snprintf(dev->name, 29, "em28xx #%d", nr);
	snprintf(dev->name, sizeof(dev->name), "em28xx #%d", nr);
	dev->devno = nr;
	dev->model = id->driver_info;
	dev->alt   = -1;