Gitweb links:

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

The branch, master has been updated
       via  cb0f7f373f55455d07f349f589ce3684d2fda167 (commit)
      from  a0d2da319d3c13549e24ac012c9dbb2b22fdb957 (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/libcss.git/commit/?id=cb0f7f373f55455d07f349f589ce3684d2fda167
commit cb0f7f373f55455d07f349f589ce3684d2fda167
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    Fix: Read beyond allocated memory when removing sheet from selection 
context.
    
    Thanks to 'effin' on #netsurf.

diff --git a/src/select/select.c b/src/select/select.c
index f1c3637..580c29e 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -388,11 +388,11 @@ css_error css_select_ctx_remove_sheet(css_select_ctx *ctx,
        if (index == ctx->n_sheets)
                return CSS_INVALID;
 
+       ctx->n_sheets--;
+
        memmove(&ctx->sheets[index], &ctx->sheets[index + 1],
                        (ctx->n_sheets - index) * sizeof(css_select_sheet));
 
-       ctx->n_sheets--;
-
        return CSS_OK;
 
 }


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

Summary of changes:
 src/select/select.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/select/select.c b/src/select/select.c
index f1c3637..580c29e 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -388,11 +388,11 @@ css_error css_select_ctx_remove_sheet(css_select_ctx *ctx,
        if (index == ctx->n_sheets)
                return CSS_INVALID;
 
+       ctx->n_sheets--;
+
        memmove(&ctx->sheets[index], &ctx->sheets[index + 1],
                        (ctx->n_sheets - index) * sizeof(css_select_sheet));
 
-       ctx->n_sheets--;
-
        return CSS_OK;
 
 }


-- 
Cascading Style Sheets library

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

Reply via email to