diff options
author | Neil Brown <neilb@suse.de> | 2006-05-29 04:06:32 +0200 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-05-29 04:06:32 +0200 |
commit | 382245c31fb3bad644fcd7d1fe51242304ba594b (patch) | |
tree | 694995546307392416957f566f2e3e67fff10871 /util.c | |
parent | Release 2.5 (diff) | |
download | mdadm-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |