Updating branch refs/heads/master
         to 78c0bf1f89da169a3aa6c8999d002fc216870957 (commit)
       from 3ecf7dd04e9a755fa8f1e675653e6145a07366b2 (commit)

commit 78c0bf1f89da169a3aa6c8999d002fc216870957
Author: Enrico Tröger <[email protected]>
Date:   Sun Apr 22 21:51:05 2012 +0200

    Fix WebDav path parsing when there is no path

 src/bookmark.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bookmark.c b/src/bookmark.c
index 42874b9..bfc2ec3 100644
--- a/src/bookmark.c
+++ b/src/bookmark.c
@@ -236,12 +236,12 @@ gboolean gigolo_bookmark_parse_uri(GigoloBookmark 
*bookmark, const gchar *uri)
 
                /* remove trailing slashes */
                l = strlen(end);
-               while (end[l-1] == '/')
+               while (*end != '\0' && end[l-1] == '/')
                {
                        l--;
                }
-
-               priv->path = g_strndup(end, l);
+               if (l > 0)
+                       priv->path = g_strndup(end, l);
        }
 
        return TRUE;
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to