Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/ae8a3ede3e1e4d139f8e5...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/ae8a3ede3e1e4d139f8e564...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/ae8a3ede3e1e4d139f8e564cf...
The branch, master has been updated
via ae8a3ede3e1e4d139f8e564cf393c1ab8914cd44 (commit)
from 718237c2a502817536bc206344cefcd699fd4fd3 (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/commitdiff/ae8a3ede3e1e4d139f8...
commit ae8a3ede3e1e4d139f8e564cf393c1ab8914cd44
Author: John-Mark Bell <jmb(a)netsurf-browser.org>
Commit: John-Mark Bell <jmb(a)netsurf-browser.org>
Fix bug #3572539: handle empty option elements.
diff --git a/render/box_construct.c b/render/box_construct.c
index 5b22e99..37fdede 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -2867,9 +2867,12 @@ bool box_select_add_option(struct form_control *control, dom_node
*n)
if (err != DOM_NO_ERR)
return false;
- text = squash_whitespace(dom_string_data(content));
-
- dom_string_unref(content);
+ if (content != NULL) {
+ text = squash_whitespace(dom_string_data(content));
+ dom_string_unref(content);
+ } else {
+ text = strdup("");
+ }
if (text == NULL)
goto no_memory;
-----------------------------------------------------------------------
Summary of changes:
render/box_construct.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/render/box_construct.c b/render/box_construct.c
index 5b22e99..37fdede 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -2867,9 +2867,12 @@ bool box_select_add_option(struct form_control *control, dom_node
*n)
if (err != DOM_NO_ERR)
return false;
- text = squash_whitespace(dom_string_data(content));
-
- dom_string_unref(content);
+ if (content != NULL) {
+ text = squash_whitespace(dom_string_data(content));
+ dom_string_unref(content);
+ } else {
+ text = strdup("");
+ }
if (text == NULL)
goto no_memory;
--
NetSurf Browser