Escape NTFS labels properly
authorMartin Pitt <martin.pitt@ubuntu.com>
Sat, 6 Nov 2010 17:13:35 +0000 (13:13 -0400)
committerMartin Pitt <martin.pitt@ubuntu.com>
Sat, 6 Nov 2010 17:13:35 +0000 (13:13 -0400)
Caught by recent test suite update.

src/helpers/job-change-filesystem-label.c

index ec826fc..5017b58 100644 (file)
@@ -101,6 +101,8 @@ main (int argc,
     }
   else if (strcmp (fstype, "ntfs") == 0)
     {
+      if (!validate_and_escape_label (&new_label, 128))
+        goto out;
       command_line = g_strdup_printf ("ntfslabel %s \"%s\"", device, new_label);
     }
   else if (strcmp (fstype, "nilfs2") == 0)