udev: collect - use snprintf()

This commit is contained in:
Robert Milasan 2012-09-27 15:51:58 +02:00 committed by Kay Sievers
parent 84c3f7c2bb
commit 2cf598fe02
1 changed files with 1 additions and 1 deletions

View File

@ -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)