Commits

Robert Milasan  committed c39c097

udev: collect - use snprintf()

  • Participants
  • Parent commits 766e54a

Comments (0)

Files changed (1)

File src/collect/collect.c

         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)