diff options
author | Chris Rankin <rankincj@yahoo.com> | 2011-08-20 07:08:34 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-03 19:49:41 -0400 |
commit | f38f33395232db1a03d21b992af1714cbffbdec4 (patch) | |
tree | 48e85071fe8234056073c6f2e8c7aad7ed524586 /drivers/media/video/em28xx/em28xx-cards.c | |
parent | c0f856d3f0e0643c617a86756fd58f23766cfe25 (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/em28xx-cards.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 2 |
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, | |||
3154 | goto err; | 3154 | goto err; |
3155 | } | 3155 | } |
3156 | 3156 | ||
3157 | snprintf(dev->name, 29, "em28xx #%d", nr); | 3157 | snprintf(dev->name, sizeof(dev->name), "em28xx #%d", nr); |
3158 | dev->devno = nr; | 3158 | dev->devno = nr; |
3159 | dev->model = id->driver_info; | 3159 | dev->model = id->driver_info; |
3160 | dev->alt = -1; | 3160 | dev->alt = -1; |