projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
916d4d6
)
rbd: use snprintf for disk->disk_name
author
Sage Weil
<sage@newdream.net>
Fri, 13 May 2011 03:57:03 +0000
(20:57 -0700)
committer
Sage Weil
<sage@newdream.net>
Tue, 24 May 2011 18:52:03 +0000
(11:52 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
drivers/block/rbd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/block/rbd.c
b/drivers/block/rbd.c
index 0d80967e140c19d21fe0bc0e40ee65a664bbecc9..d833d02b321f239b840266f739a6a878eb47cacf 100644
(file)
--- a/
drivers/block/rbd.c
+++ b/
drivers/block/rbd.c
@@
-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;