diff options
Diffstat (limited to 'block/blktrace.c')
-rw-r--r-- | block/blktrace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blktrace.c b/block/blktrace.c index 9e0212c90b2..85049a7e7a1 100644 --- a/block/blktrace.c +++ b/block/blktrace.c | |||
@@ -369,7 +369,8 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, | |||
369 | if (!buts->buf_size || !buts->buf_nr) | 369 | if (!buts->buf_size || !buts->buf_nr) |
370 | return -EINVAL; | 370 | return -EINVAL; |
371 | 371 | ||
372 | strcpy(buts->name, name); | 372 | strncpy(buts->name, name, BLKTRACE_BDEV_SIZE); |
373 | buts->name[BLKTRACE_BDEV_SIZE - 1] = '\0'; | ||
373 | 374 | ||
374 | /* | 375 | /* |
375 | * some device names have larger paths - convert the slashes | 376 | * some device names have larger paths - convert the slashes |