summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}