Gitweb links:

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

The branch, master has been updated
       via  b15b204f4958f039573868c02093f3aa2ae48e98 (commit)
      from  05c6ee02d99ea04dde6687d94508b40f4393f77b (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=b15b204f4958f039573868c02093f3aa2ae48e98
commit b15b204f4958f039573868c02093f3aa2ae48e98
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    form: Fix situation where a gadget initialises with NULL value
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/content/handlers/html/form.c b/content/handlers/html/form.c
index e8461cd..2918ce7 100644
--- a/content/handlers/html/form.c
+++ b/content/handlers/html/form.c
@@ -2269,8 +2269,12 @@ form_gadget_sync_with_dom(struct form_control *control)
        control->syncing = true;
 
        /* If we've changed value, sync that toward the DOM */
-       if ((control->last_synced_value == NULL && control->value[0] != '\0') ||
-           (control->last_synced_value != NULL && strcmp(control->value, 
control->last_synced_value) != 0)) {
+       if ((control->last_synced_value == NULL &&
+            control->value != NULL &&
+            control->value[0] != '\0') ||
+           (control->last_synced_value != NULL &&
+            control->value != NULL &&
+            strcmp(control->value, control->last_synced_value) != 0)) {
                char *dup = strdup(control->value);
                if (dup == NULL) {
                        goto out;


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

Summary of changes:
 content/handlers/html/form.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/content/handlers/html/form.c b/content/handlers/html/form.c
index e8461cd..2918ce7 100644
--- a/content/handlers/html/form.c
+++ b/content/handlers/html/form.c
@@ -2269,8 +2269,12 @@ form_gadget_sync_with_dom(struct form_control *control)
        control->syncing = true;
 
        /* If we've changed value, sync that toward the DOM */
-       if ((control->last_synced_value == NULL && control->value[0] != '\0') ||
-           (control->last_synced_value != NULL && strcmp(control->value, 
control->last_synced_value) != 0)) {
+       if ((control->last_synced_value == NULL &&
+            control->value != NULL &&
+            control->value[0] != '\0') ||
+           (control->last_synced_value != NULL &&
+            control->value != NULL &&
+            strcmp(control->value, control->last_synced_value) != 0)) {
                char *dup = strdup(control->value);
                if (dup == NULL) {
                        goto out;


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to