aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--src/bookmarks/ephy-bookmarks-import.c9
2 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b06f3960a..12a093771 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2004-02-27 Christian Persch <chpe@cvs.gnome.org>
+ * src/bookmarks/ephy-bookmarks-import.c: (ns_parse_bookmark_item):
+
+ Fix potential crash.
+
+ (ephy_bookmarks_import_mozilla):
+
+ Fix mem leak.
+
+2004-02-27 Christian Persch <chpe@cvs.gnome.org>
+
* src/bookmarks/ephy-bookmarks-import.c: (ephy_bookmarks_import_mozilla):
Replace entities also in folder names, fixes bug #135440.
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c
index 01a7feb24..0b0eecfa1 100644
--- a/src/bookmarks/ephy-bookmarks-import.c
+++ b/src/bookmarks/ephy-bookmarks-import.c
@@ -490,6 +490,8 @@ ns_get_bookmark_item (FILE *f, GString *name, GString *url)
* More info : http://www.w3.org/TR/html4/charset.html#h-5.3.2
* NOTE : We don't support &#D or &#xH.
* Patch courtesy of Almer S. Tigelaar <almer1@dds.nl>
+ *
+ * NOTE: The returned string must be freed.
*/
static char *
ns_parse_bookmark_item (GString *string)
@@ -557,7 +559,7 @@ ns_parse_bookmark_item (GString *string)
for (i = jump - 1; i > 0; i--)
{
iterator++;
- if (iterator == NULL)
+ if (*iterator == '\0')
break;
}
}
@@ -577,7 +579,7 @@ ephy_bookmarks_import_mozilla (EphyBookmarks *bookmarks,
{
FILE *bf; /* bookmark file */
GString *name;
- gchar *parsedname;
+ char *parsedname;
GString *url = g_string_new (NULL);
GList *folders = NULL, *l;
@@ -636,6 +638,9 @@ ephy_bookmarks_import_mozilla (EphyBookmarks *bookmarks,
ephy_bookmarks_set_keyword (bookmarks, keyword, node);
}
}
+
+ g_free (parsedname);
+
break;
default:
break;