mirror of
https://github.com/systemd/systemd.git
synced 2025-03-11 20:58:27 +03:00
udev: collect - use snprintf()
This commit is contained in:
parent
84c3f7c2bb
commit
2cf598fe02
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user