summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-11-22 14:21:47 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-11-22 14:21:47 +0000
commit8685cfb3b77ecd1a67a4120c14960e1a81fa08ce (patch)
treec5a37837a197f8ef2c9674d00c464b10a31b762a
parentaaa14e76722c4f3120b530d18295c2f724f49d61 (diff)
downloadnetsurf-8685cfb3b77ecd1a67a4120c14960e1a81fa08ce.tar.gz
netsurf-8685cfb3b77ecd1a67a4120c14960e1a81fa08ce.tar.bz2
Fix the other half of this NULL dereference issue
svn path=/trunk/netsurf/; revision=9695
-rw-r--r--content/urldb.c3
1 files changed, 2 insertions, 1 deletions
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;