From 2cf598fe02a391e771874b6aa43b55f81068e119 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Thu, 27 Sep 2012 15:51:58 +0200 Subject: udev: collect - use snprintf() --- src/udev/collect/collect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/udev/collect') diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c index feae4bb6ba..3c46e40de1 100644 --- a/src/udev/collect/collect.c +++ b/src/udev/collect/collect.c @@ -93,7 +93,7 @@ static int prepare(char *dir, char *filename) if (stat(dir, &statbuf) < 0) mkdir(dir, 0700); - sprintf(buf, "%s/%s", dir, filename); + snprintf(buf, sizeof(buf), "%s/%s", dir, filename); fd = open(buf,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); if (fd < 0) -- cgit v1.2.3-54-g00ecf