From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> The buffer passed on to readlink() needs to contain space for the terminating \0. See 'man 3 readlink' for details. Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- Grow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Grow.c b/Grow.c index b78d063..a8bbf2b 100644 --- a/Grow.c +++ b/Grow.c @@ -3319,7 +3319,7 @@ started: bul = make_backup(sra->sys_name); if (bul) { char buf[1024]; - int l = readlink(bul, buf, sizeof(buf)); + int l = readlink(bul, buf, sizeof(buf) - 1); if (l > 0) { buf[l]=0; unlink(buf); -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html