Commit aedfec59 authored by Sage Weil's avatar Sage Weil

rbd: use snprintf for disk->disk_name

Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 916d4d67
......@@ -1721,7 +1721,8 @@ static int rbd_init_disk(struct rbd_device *rbd_dev)
if (!disk)
goto out;
sprintf(disk->disk_name, DRV_NAME "%d", rbd_dev->id);
snprintf(disk->disk_name, sizeof(disk->disk_name), DRV_NAME "%d",
rbd_dev->id);
disk->major = rbd_dev->major;
disk->first_minor = 0;
disk->fops = &rbd_bd_ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment