Gitweb links:

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

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

    monkey/browser.c: Handle failed calloc more gracefully
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index 232f33e..a00dcb4 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -594,6 +594,10 @@ monkey_window_handle_exec(int argc, char **argv)
                        total += strlen(argv[i]) + 1;
                }
                char *cmd = calloc(total, 1);
+               if (cmd == NULL) {
+                       moutf(MOUT_ERROR, "JS WIN %d RET ENOMEM", 
atoi(argv[2]));
+                       return;
+               }
                strcpy(cmd, argv[4]);
                for (int i = 5; i < argc; ++i) {
                        strcat(cmd, " ");


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

Summary of changes:
 frontends/monkey/browser.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index 232f33e..a00dcb4 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -594,6 +594,10 @@ monkey_window_handle_exec(int argc, char **argv)
                        total += strlen(argv[i]) + 1;
                }
                char *cmd = calloc(total, 1);
+               if (cmd == NULL) {
+                       moutf(MOUT_ERROR, "JS WIN %d RET ENOMEM", 
atoi(argv[2]));
+                       return;
+               }
                strcpy(cmd, argv[4]);
                for (int i = 5; i < argc; ++i) {
                        strcat(cmd, " ");


-- 
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