summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-05-29 04:06:32 +0200
committerNeil Brown <neilb@suse.de>2006-05-29 04:06:32 +0200
commit382245c31fb3bad644fcd7d1fe51242304ba594b (patch)
tree694995546307392416957f566f2e3e67fff10871 /util.c
parentRelease 2.5 (diff)
downloadmdadm-382245c31fb3bad644fcd7d1fe51242304ba594b.tar.xz
mdadm-382245c31fb3bad644fcd7d1fe51242304ba594b.zip
snprintf size should be at most the size of the buffer
From: Luca Berra <bluca@vodka.it> Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to '')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index d36feb53..279bfd77 100644
--- a/util.c
+++ b/util.c
@@ -446,7 +446,7 @@ char *map_dev(int major, int minor, int create)
}
if (create && !std && !nonstd) {
static char buf[30];
- snprintf(buf, 1024, "%d:%d", major, minor);
+ snprintf(buf, sizeof(buf), "%d:%d", major, minor);
nonstd = buf;
}