snprintf()'s size parameter includes space for the terminating '\0' character. Signed-off-by: Chris Rankin <rankincj@xxxxxxxxx>
--- linux-3.0/drivers/media/video/em28xx/em28xx-cards.c.orig 2011-08-17 08:52:19.000000000 +0100 +++ linux-3.0/drivers/media/video/em28xx/em28xx-cards.c 2011-08-18 22:03:05.000000000 +0100 @@ -3085,7 +3085,7 @@ 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;