From 32ef0132a49ca53747a9994c3a146e9e8a0aa7c3 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Tue, 21 Oct 2008 10:22:16 +0200 Subject: [PATCH] Increase buffer size in find_loop_by_file() find_loop_by_file() uses an internal buffer of 20 chars, which is compared to a buffer of the size of 64 chars. Not good. References: 436428 Signed-off-by: Hannes Reinecke --- kpartx/lopart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kpartx/lopart.c b/kpartx/lopart.c index 33f312b..79d8328 100644 --- a/kpartx/lopart.c +++ b/kpartx/lopart.c @@ -105,7 +105,7 @@ is_loop_device (const char *device) extern char * find_loop_by_file (const char * filename) { - char dev[20]; + char dev[64]; char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" }; int i, j, fd; struct stat statbuf; -- 2.7.4