Fix alloca size in rbd_destroy

Signed-off-by: Laurent Barbe <laurent@ksperis.com>
This commit is contained in:
Laurent Barbe 2015-10-14 09:52:50 +02:00
parent 60656b379b
commit a237da92a0

View File

@ -1245,7 +1245,7 @@ static int rbd_destroy(struct bdev *orig)
if ((pid = fork()) < 0)
return -1;
if (!pid) {
rbdfullname = alloca(strlen(orig->src) - 9);
rbdfullname = alloca(strlen(orig->src) - 8);
strcpy( rbdfullname, &orig->src[9] );
execlp("rbd", "rbd", "rm" , rbdfullname, NULL);
exit(1);