From f38f33395232db1a03d21b992af1714cbffbdec4 Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Sat, 20 Aug 2011 08:08:34 -0300 Subject: [PATCH] [media] em28xx: pass correct buffer size to snprintf snprintf()'s size parameter includes space for the terminating '\0' character. Signed-off-by: Chris Rankin Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/em28xx/em28xx-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 3e3959fee419..d947026e4795 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c @@ -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; -- 2.39.5