From 81c1b0e0dfd0c079024c98497d18bc6a55ad24ed Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 22 Nov 2009 13:49:43 +0000 Subject: [PATCH] Don't call memcpy when p->segment is NULL svn path=/trunk/netsurf/; revision=9687 --- content/urldb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/urldb.c b/content/urldb.c index 8089e0d4e..68e39f10f 100644 --- a/content/urldb.c +++ b/content/urldb.c @@ -655,7 +655,8 @@ void urldb_write_paths(const struct path_data *parent, const char *host, *path_alloc = (len > 64) ? len : *path_alloc + 64; } - memcpy(*path + *path_used - 1, p->segment, seglen); + if (p->segment != NULL) + memcpy(*path + *path_used - 1, p->segment, seglen); if (p->children != NULL) { (*path)[*path_used + seglen - 1] = '/';