From 8685cfb3b77ecd1a67a4120c14960e1a81fa08ce Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 22 Nov 2009 14:21:47 +0000 Subject: Fix the other half of this NULL dereference issue svn path=/trunk/netsurf/; revision=9695 --- content/urldb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'content') diff --git a/content/urldb.c b/content/urldb.c index 6b63eaa64..50c15810d 100644 --- a/content/urldb.c +++ b/content/urldb.c @@ -720,7 +720,8 @@ void urldb_write_paths(const struct path_data *parent, const char *host, /* Now, find next node to process. */ while (p != parent) { - int seglen = strlen(p->segment); + int seglen = p->segment != NULL + ? strlen(p->segment) : 0; /* Remove our segment from the path */ *path_used -= seglen; -- cgit v1.2.3