projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84c3f7c
)
udev: collect - use snprintf()
author
Robert Milasan
<rmilasan@suse.com>
Thu, 27 Sep 2012 13:51:58 +0000
(15:51 +0200)
committer
Kay Sievers
<kay@vrfy.org>
Thu, 27 Sep 2012 13:51:58 +0000
(15:51 +0200)
src/udev/collect/collect.c
patch
|
blob
|
history
diff --git
a/src/udev/collect/collect.c
b/src/udev/collect/collect.c
index
feae4bb
..
3c46e40
100644
(file)
--- 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);
- s
printf(buf
, "%s/%s", dir, filename);
+ s
nprintf(buf, sizeof(buf)
, "%s/%s", dir, filename);
fd = open(buf,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
if (fd < 0)