Title: [8839] trunk/drivers/staging/iio/Documentation/iio_utils.h: iio-utils: fix memory overflow for alloced filename
Revision
8839
Author
bhsong
Date
2010-05-24 05:10:20 -0400 (Mon, 24 May 2010)

Log Message

iio-utils: fix memory overflow for alloced filename

Modified Paths


Diff

Modified: trunk/drivers/staging/iio/Documentation/iio_utils.h (8838 => 8839)


--- trunk/drivers/staging/iio/Documentation/iio_utils.h	2010-05-24 04:48:00 UTC (rev 8838)
+++ trunk/drivers/staging/iio/Documentation/iio_utils.h	2010-05-24 09:10:20 UTC (rev 8839)
@@ -64,7 +64,8 @@
 						+ strlen(type)
 						+ 1
 						+ numstrlen
-						+ 1);
+						+ 1
+						+ IIO_MAX_NAME_LENGTH);
 				if (filename == NULL)
 					return -ENOMEM;
 				sprintf(filename, "%s%s%d/name",
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to