[systemd-commits] src/udev

Kay Sievers kay at kemper.freedesktop.org
Thu Sep 27 07:00:18 PDT 2012


 src/udev/collect/collect.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2cf598fe02a391e771874b6aa43b55f81068e119
Author: Robert Milasan <rmilasan at suse.com>
Date:   Thu Sep 27 15:51:58 2012 +0200

    udev: collect - use snprintf()

diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
index feae4bb..3c46e40 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)



More information about the systemd-commits mailing list