From 3d420825ce14c3b867571c22413fd9bc48738a6e Mon Sep 17 00:00:00 2001 From: Jiro SEKIBA Date: Fri, 15 Oct 2010 13:48:07 +0900 Subject: [PATCH] udisks: escape backslash for label string validate_and_escape_label will only escapes '"'. However, string '\"' will be escaped to '\\"' which leads unmatched double quote for shell string in result. This adds escaping '\' in validate_and_escape_label to avoid the problem. Signed-off-by: Jiro SEKIBA Signed-off-by: Martin Pitt --- src/helpers/job-shared.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/helpers/job-shared.h b/src/helpers/job-shared.h index 4649b45..ae263f2 100644 --- a/src/helpers/job-shared.h +++ b/src/helpers/job-shared.h @@ -217,6 +217,11 @@ validate_and_escape_label (char **label, g_string_insert_c (s, n, '\\'); n++; } + else if (s->str[n] == '\\') + { + g_string_insert_c (s, n, '\\'); + n++; + } } g_free (*label); *label = g_string_free (s, FALSE); -- 2.7.4