1
0
Fork 0

[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>
hifive-unleashed-5.1
Chris Rankin 2011-08-20 08:08:34 -03:00 committed by Mauro Carvalho Chehab
parent c0f856d3f0
commit f38f333952
1 changed files with 1 additions and 1 deletions

View 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;