netsurf: branch master updated. release/3.0-21-g2f03a0b

NetSurf Browser Project (Commit Mailer) no-reply at netsurf-browser.org
Wed May 1 23:00:21 BST 2013


Gitweb links:

...log http://git.netsurf-browser.org/netsurf.git/shortlog/2f03a0bfaf10f3bba7c041d7d5189f764735d5fd
...commit http://git.netsurf-browser.org/netsurf.git/commit/2f03a0bfaf10f3bba7c041d7d5189f764735d5fd
...tree http://git.netsurf-browser.org/netsurf.git/tree/2f03a0bfaf10f3bba7c041d7d5189f764735d5fd

The branch, master has been updated
       via  2f03a0bfaf10f3bba7c041d7d5189f764735d5fd (commit)
       via  82e2fc57d7ded7e917ae399ca99fa8953f137b2d (commit)
       via  25e6563e6133c849814b621ce4c34a6419eace56 (commit)
      from  820767e417fb63355a904f0ce0761be17f3a03fa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=2f03a0bfaf10f3bba7c041d7d5189f764735d5fd
commit 2f03a0bfaf10f3bba7c041d7d5189f764735d5fd
Author: Vincent Sanders <vince at netsurf-browser.org>
Commit: Vincent Sanders <vince at netsurf-browser.org>

    fix use after free on error path

diff --git a/desktop/tree_url_node.c b/desktop/tree_url_node.c
index f411dac..76bc8a4 100644
--- a/desktop/tree_url_node.c
+++ b/desktop/tree_url_node.c
@@ -565,12 +565,12 @@ static void tree_url_load_entry(dom_node *li, tree_url_load_ctx *ctx)
 
 	error = nsurl_create(url2, &url);
 
-	free(url2);
-
 	if (error != NSERROR_OK) {
 		LOG(("Failed normalising '%s'", url2));
 
-		warn_user("NoMemory", NULL);
+		free(url2);
+
+		warn_user(messages_get_errorcode(error), NULL);
 
 		free(title);
 		dom_node_unref(a);
@@ -578,6 +578,8 @@ static void tree_url_load_entry(dom_node *li, tree_url_load_ctx *ctx)
 		return;
 	}
 
+	free(url2);
+
 	data = urldb_get_url_data(url);
 	if (data == NULL) {
 		/* No entry in database, so add one */


commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=82e2fc57d7ded7e917ae399ca99fa8953f137b2d
commit 82e2fc57d7ded7e917ae399ca99fa8953f137b2d
Author: Vincent Sanders <vince at netsurf-browser.org>
Commit: Vincent Sanders <vince at netsurf-browser.org>

    free memory on error path

diff --git a/content/llcache.c b/content/llcache.c
index 8996aca..171ae15 100644
--- a/content/llcache.c
+++ b/content/llcache.c
@@ -539,8 +539,11 @@ static nserror llcache_fetch_parse_header(llcache_object *object,
 		/* extract ETag header */
 		free(object->cache.etag);
 		object->cache.etag = strdup(*value);
-		if (object->cache.etag == NULL)
+		if (object->cache.etag == NULL) {
+			free(*name);
+			free(*value);
 			return NSERROR_NOMEM;
+		}
 	} else if (14 < len && strcasecmp(*name, "Last-Modified") == 0) {
 		/* extract Last-Modified header */
 		object->cache.last_modified = curl_getdate(*value, NULL);
@@ -613,8 +616,9 @@ static nserror llcache_fetch_process_header(llcache_object *object,
 	}
 
 	error = llcache_fetch_parse_header(object, data, len, &name, &value);
-	if (error != NSERROR_OK)
+	if (error != NSERROR_OK) {
 		return error;
+	}
 
 	/* Append header data to the object's headers array */
 	temp = realloc(object->headers, (object->num_headers + 1) * 


commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=25e6563e6133c849814b621ce4c34a6419eace56
commit 25e6563e6133c849814b621ce4c34a6419eace56
Author: Vincent Sanders <vince at netsurf-browser.org>
Commit: Vincent Sanders <vince at netsurf-browser.org>

    remove dead store

diff --git a/render/table.c b/render/table.c
index 4cc213d..5eba544 100644
--- a/render/table.c
+++ b/render/table.c
@@ -687,7 +687,6 @@ void table_used_bottom_border_for_cell(struct box *cell)
 		
 		if (table_border_is_more_eyecatching(&a, a_src, &b, b_src)) {
 			a = b;
-			a_src = b_src;
 		}
 	}
 


-----------------------------------------------------------------------

Summary of changes:
 content/llcache.c       |    8 ++++++--
 desktop/tree_url_node.c |    8 +++++---
 render/table.c          |    1 -
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/content/llcache.c b/content/llcache.c
index 8996aca..171ae15 100644
--- a/content/llcache.c
+++ b/content/llcache.c
@@ -539,8 +539,11 @@ static nserror llcache_fetch_parse_header(llcache_object *object,
 		/* extract ETag header */
 		free(object->cache.etag);
 		object->cache.etag = strdup(*value);
-		if (object->cache.etag == NULL)
+		if (object->cache.etag == NULL) {
+			free(*name);
+			free(*value);
 			return NSERROR_NOMEM;
+		}
 	} else if (14 < len && strcasecmp(*name, "Last-Modified") == 0) {
 		/* extract Last-Modified header */
 		object->cache.last_modified = curl_getdate(*value, NULL);
@@ -613,8 +616,9 @@ static nserror llcache_fetch_process_header(llcache_object *object,
 	}
 
 	error = llcache_fetch_parse_header(object, data, len, &name, &value);
-	if (error != NSERROR_OK)
+	if (error != NSERROR_OK) {
 		return error;
+	}
 
 	/* Append header data to the object's headers array */
 	temp = realloc(object->headers, (object->num_headers + 1) * 
diff --git a/desktop/tree_url_node.c b/desktop/tree_url_node.c
index f411dac..76bc8a4 100644
--- a/desktop/tree_url_node.c
+++ b/desktop/tree_url_node.c
@@ -565,12 +565,12 @@ static void tree_url_load_entry(dom_node *li, tree_url_load_ctx *ctx)
 
 	error = nsurl_create(url2, &url);
 
-	free(url2);
-
 	if (error != NSERROR_OK) {
 		LOG(("Failed normalising '%s'", url2));
 
-		warn_user("NoMemory", NULL);
+		free(url2);
+
+		warn_user(messages_get_errorcode(error), NULL);
 
 		free(title);
 		dom_node_unref(a);
@@ -578,6 +578,8 @@ static void tree_url_load_entry(dom_node *li, tree_url_load_ctx *ctx)
 		return;
 	}
 
+	free(url2);
+
 	data = urldb_get_url_data(url);
 	if (data == NULL) {
 		/* No entry in database, so add one */
diff --git a/render/table.c b/render/table.c
index 4cc213d..5eba544 100644
--- a/render/table.c
+++ b/render/table.c
@@ -687,7 +687,6 @@ void table_used_bottom_border_for_cell(struct box *cell)
 		
 		if (table_border_is_more_eyecatching(&a, a_src, &b, b_src)) {
 			a = b;
-			a_src = b_src;
 		}
 	}
 


-- 
NetSurf Browser



More information about the netsurf-commits mailing list