From: Chris Rankin Date: Sat, 20 Aug 2011 11:08:34 +0000 (-0300) Subject: [media] em28xx: pass correct buffer size to snprintf X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f38f33395232db1a03d21b992af1714cbffbdec4;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [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 --- diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 3e3959fee41..d947026e479 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;