[media] em28xx: pass correct buffer size to snprintf
authorChris Rankin <rankincj@yahoo.com>
Sat, 20 Aug 2011 11:08:34 +0000 (08:08 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 3 Sep 2011 23:49:41 +0000 (20:49 -0300)
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>
drivers/media/video/em28xx/em28xx-cards.c

index 3e3959fee4195cad5bfc6070d42250f57e2c96a2..d947026e4795e5cd78568a3198724aa26dbb22a5 100644 (file)
@@ -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;
This page took 0.02768 seconds and 5 git commands to generate.