[gvfs/wip/udisks2] Fix off-by-one when parsing mount options with a value of length 1



commit 1c75aff19b7fb06e1d49de3fb108c648da4428be
Author: David Zeuthen <davidz redhat com>
Date:   Tue Jan 17 15:17:33 2012 -0500

    Fix off-by-one when parsing mount options with a value of length 1
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 monitor/udisks2/gvfsudisks2utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/monitor/udisks2/gvfsudisks2utils.c b/monitor/udisks2/gvfsudisks2utils.c
index 207777a..b5f2936 100644
--- a/monitor/udisks2/gvfsudisks2utils.c
+++ b/monitor/udisks2/gvfsudisks2utils.c
@@ -99,7 +99,7 @@ gvfs_udisks2_utils_lookup_fstab_options_value (const gchar *fstab_options,
           start += strlen (key);
           for (n = 0; start[n] != ',' && start[n] != '\0'; n++)
             ;
-          if (n > 1)
+          if (n >= 1)
             ret = g_uri_unescape_segment (start, start + n, NULL);
         }
     }



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