From 0b4189b6d34d9ad1318381410e0d27edd10b7c62 Mon Sep 17 00:00:00 2001 From: Jiro SEKIBA Date: Fri, 15 Oct 2010 13:44:22 +0900 Subject: [PATCH] udisks: fix a bug of unquoted/unescaped label string This patch quotes/escapes label string for nilfs-tune. Signed-off-by: Jiro SEKIBA Signed-off-by: Martin Pitt --- src/helpers/job-change-filesystem-label.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/helpers/job-change-filesystem-label.c b/src/helpers/job-change-filesystem-label.c index bdb28c6..ec826fc 100644 --- a/src/helpers/job-change-filesystem-label.c +++ b/src/helpers/job-change-filesystem-label.c @@ -105,7 +105,9 @@ main (int argc, } else if (strcmp (fstype, "nilfs2") == 0) { - command_line = g_strdup_printf ("nilfs-tune -L %s \"%s\"", new_label, device); + if (!validate_and_escape_label (&new_label, 80)) + goto out; + command_line = g_strdup_printf ("nilfs-tune -L \"%s\" %s", new_label, device); } else { -- 2.7.4