diff mbox

quickcam_messenger.c: possible buffer overflow while use strncat.

Message ID 200910071556.54534.strakh@ispras.ru (mailing list archive)
State Accepted
Headers show

Commit Message

iceberg Oct. 7, 2009, 3:56 p.m. UTC
None
diff mbox

Patch

diff --git a/./a/drivers/media/video/usbvideo/quickcam_messenger.c 
b/./b/drivers/media/video/usbvideo/quickcam_messenger.c
index 803d3e4..c4d1b96 100644
--- a/./a/drivers/media/video/usbvideo/quickcam_messenger.c
+++ b/./b/drivers/media/video/usbvideo/quickcam_messenger.c
@@ -89,7 +89,7 @@  static void qcm_register_input(struct qcm *cam, struct 
usb_device *dev)
 	int error;
 
 	usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname));
-	strncat(cam->input_physname, "/input0", sizeof(cam->input_physname));
+	strlcat(cam->input_physname, "/input0", sizeof(cam->input_physname));
 
 	cam->input = input_dev = input_allocate_device();