summaryrefslogtreecommitdiffstats
path: root/mdopen.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-11-07 04:46:51 +0100
committerNeilBrown <neilb@suse.de>2008-11-07 04:46:51 +0100
commite10a79c344d3e93612b359b526aae47ad02fb446 (patch)
treedeed6979842b12ed60164924781916c1e87999fb /mdopen.c
parentMakefile: install udev file into $DESTDIR (diff)
downloadmdadm-e10a79c344d3e93612b359b526aae47ad02fb446.tar.xz
mdadm-e10a79c344d3e93612b359b526aae47ad02fb446.zip
mdopen: typo in buffer-length for a sprintf.
That '10000' should have been '1000'. Make it a 'sizeof' to avoid such carelessness. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdopen.c')
-rw-r--r--mdopen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdopen.c b/mdopen.c
index e1c0d7f2..26da33e3 100644
--- a/mdopen.c
+++ b/mdopen.c
@@ -88,7 +88,7 @@ void make_parts(char *dev, int cnt)
if (chmod(name, stb2.st_mode & 07777))
perror("chmod");
} else {
- snprintf(sym, 10000, "%s%s%d", orig, odig?"p":"", i);
+ snprintf(sym, sizeof(sym), "%s%s%d", orig, odig?"p":"", i);
symlink(sym, name);
}
stat(name, &stb2);