From ff346513255844194472fac4cdd8772937b8665f Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Mon, 21 Dec 2015 15:48:02 +0000 Subject: [PATCH] iio.c: Replace sprintf with snprintf Signed-off-by: Brendan Le Foll --- src/iio/iio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iio/iio.c b/src/iio/iio.c index f15a337..1d02983 100644 --- a/src/iio/iio.c +++ b/src/iio/iio.c @@ -441,7 +441,7 @@ mraa_iio_event_poll(mraa_iio_context dev, struct iio_event_data* data) int event_fd; int fd; - sprintf(bu, IIO_SLASH_DEV "%d", dev->num); + snprintf(bu, MAX_SIZE, IIO_SLASH_DEV "%d", dev->num); fd = open(bu, 0); ret = ioctl(fd, IIO_GET_EVENT_FD_IOCTL, &event_fd); close(fd); -- 2.7.4