summaryrefslogtreecommitdiff
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorChris Rankin <rankincj@yahoo.com>2011-08-20 08:08:34 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-03 20:49:41 -0300
commitf38f33395232db1a03d21b992af1714cbffbdec4 (patch)
tree48e85071fe8234056073c6f2e8c7aad7ed524586 /drivers/media/video/em28xx
parentc0f856d3f0e0643c617a86756fd58f23766cfe25 (diff)
[media] em28xx: pass correct buffer size to snprintf
snprintf()'s size parameter includes space for the terminating '\0' character. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c2
1 files changed, 1 insertions, 1 deletions
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;