[brasero] Don't allow folders in a data disc to have an empty name



commit 0eab4d1b7a77b196e451bbafdc3384a817f60ca9
Author: Joshua Lock <joshua lock intel com>
Date:   Mon Jul 8 20:50:13 2013 +0100

    Don't allow folders in a data disc to have an empty name
    
    Disc creation fails when a folder name is empty.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703823

 libbrasero-burn/brasero-data-project.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libbrasero-burn/brasero-data-project.c b/libbrasero-burn/brasero-data-project.c
index 0cebd2b..52e8502 100644
--- a/libbrasero-burn/brasero-data-project.c
+++ b/libbrasero-burn/brasero-data-project.c
@@ -1575,6 +1575,11 @@ brasero_data_project_rename_node (BraseroDataProject *self,
 
        priv = BRASERO_DATA_PROJECT_PRIVATE (self);
 
+       /* Don't allow rename to succeed if name is the empty string */
+       if (strlen (name) < 1) {
+               return FALSE;
+       }
+
        /* make sure there isn't the same name in the directory: if so, that's 
         * simply not possible to rename. */
        sibling = brasero_file_node_check_name_existence (node->parent, name);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]